llvm.org GIT mirror llvm / a1ff0ae
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212029 91177308-0d34-0410-b5e6-96231b3b80d8 Scott Douglass 6 years ago
3 changed file(s) with 29 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
4040 ELF_STT_File = (ELF::STT_FILE << ELF_STT_Shift),
4141 ELF_STT_Common = (ELF::STT_COMMON << ELF_STT_Shift),
4242 ELF_STT_Tls = (ELF::STT_TLS << ELF_STT_Shift),
43 ELF_STT_GnuIFunc = (ELF::STT_GNU_IFUNC << ELF_STT_Shift),
4344 ELF_STT_Loproc = (ELF::STT_LOPROC << ELF_STT_Shift),
4445 ELF_STT_Hiproc = (ELF::STT_HIPROC << ELF_STT_Shift),
4546
991991 return;
992992
993993 const MCSymbolData &SD = Streamer.getOrCreateSymbolData(Symbol);
994 if (MCELF::GetType(SD) & (ELF::STT_FUNC << ELF_STT_Shift))
994 unsigned Type = MCELF::GetType(SD);
995 if (Type == ELF_STT_Func || Type == ELF_STT_GnuIFunc)
995996 Streamer.EmitThumbFunc(Symbol);
996997 }
997998
2828 explicit_function:
2929 nop
3030
31 .long tls(TPOFF)
32
33 .type indirect_function,%gnu_indirect_function
34 indirect_function:
35 nop
36
3137 .data
3238
3339 untyped_data_label:
3642 .type explicit_data,%object
3743 explicit_data:
3844 .long 0
45
46 .section .tdata,"awT",%progbits
47 .type tls,%object
48 .align 2
49 tls:
50 .long 42
51 .size tls, 4
52
3953
4054 @ CHECK: Symbol {
4155 @ CHECK: Name: arm_function
6882 @ CHECK: }
6983
7084 @ CHECK: Symbol {
85 @ CHECK: Name: indirect_function
86 @ CHECK: Value: 0x13
87 @ CHECK: Type: GNU_IFunc
88 @ CHECK: }
89
90 @ CHECK: Symbol {
91 @ CHECK: Name: tls
92 @ CHECK: Value: 0x0
93 @ CHECK: Type: TLS
94 @ CHECK: }
95
96 @ CHECK: Symbol {
7197 @ CHECK: Name: untyped_data_label
7298 @ CHECK: Value: 0x0
7399 @ CHECK: Type: None