mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
ARM: take care not to set the ThumbFunc bit on TLS data symbols
This fixes LNT SingleSource/UnitTests/Threads with -mthumb. Differential Revision: http://reviews.llvm.org/D4324 llvm-svn: 212029
This commit is contained in:
parent
d49097588c
commit
dbd9f7ce21
@ -41,6 +41,7 @@ namespace llvm {
|
||||
ELF_STT_File = (ELF::STT_FILE << ELF_STT_Shift),
|
||||
ELF_STT_Common = (ELF::STT_COMMON << ELF_STT_Shift),
|
||||
ELF_STT_Tls = (ELF::STT_TLS << ELF_STT_Shift),
|
||||
ELF_STT_GnuIFunc = (ELF::STT_GNU_IFUNC << ELF_STT_Shift),
|
||||
ELF_STT_Loproc = (ELF::STT_LOPROC << ELF_STT_Shift),
|
||||
ELF_STT_Hiproc = (ELF::STT_HIPROC << ELF_STT_Shift),
|
||||
|
||||
|
@ -992,7 +992,8 @@ void ARMTargetELFStreamer::emitLabel(MCSymbol *Symbol) {
|
||||
return;
|
||||
|
||||
const MCSymbolData &SD = Streamer.getOrCreateSymbolData(Symbol);
|
||||
if (MCELF::GetType(SD) & (ELF::STT_FUNC << ELF_STT_Shift))
|
||||
unsigned Type = MCELF::GetType(SD);
|
||||
if (Type == ELF_STT_Func || Type == ELF_STT_GnuIFunc)
|
||||
Streamer.EmitThumbFunc(Symbol);
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,12 @@ untyped_text_label:
|
||||
explicit_function:
|
||||
nop
|
||||
|
||||
.long tls(TPOFF)
|
||||
|
||||
.type indirect_function,%gnu_indirect_function
|
||||
indirect_function:
|
||||
nop
|
||||
|
||||
.data
|
||||
|
||||
untyped_data_label:
|
||||
@ -38,6 +44,14 @@ untyped_data_label:
|
||||
explicit_data:
|
||||
.long 0
|
||||
|
||||
.section .tdata,"awT",%progbits
|
||||
.type tls,%object
|
||||
.align 2
|
||||
tls:
|
||||
.long 42
|
||||
.size tls, 4
|
||||
|
||||
|
||||
@ CHECK: Symbol {
|
||||
@ CHECK: Name: arm_function
|
||||
@ CHECK: Value: 0x6
|
||||
@ -68,6 +82,18 @@ explicit_data:
|
||||
@ CHECK: Type: Function
|
||||
@ CHECK: }
|
||||
|
||||
@ CHECK: Symbol {
|
||||
@ CHECK: Name: indirect_function
|
||||
@ CHECK: Value: 0x13
|
||||
@ CHECK: Type: GNU_IFunc
|
||||
@ CHECK: }
|
||||
|
||||
@ CHECK: Symbol {
|
||||
@ CHECK: Name: tls
|
||||
@ CHECK: Value: 0x0
|
||||
@ CHECK: Type: TLS
|
||||
@ CHECK: }
|
||||
|
||||
@ CHECK: Symbol {
|
||||
@ CHECK: Name: untyped_data_label
|
||||
@ CHECK: Value: 0x0
|
||||
|
Loading…
Reference in New Issue
Block a user