This repository was archived by the owner on Feb 5, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +32
-4
lines changed
lib/Target/Mips/MCTargetDesc Expand file tree Collapse file tree 2 files changed +32
-4
lines changed Original file line number Diff line number Diff line change @@ -240,8 +240,6 @@ void MipsMCExpr::fixELFSymbolsInTLSFixups(MCAssembler &Asm) const {
240240 break ;
241241 case MEK_CALL_HI16:
242242 case MEK_CALL_LO16:
243- case MEK_DTPREL_HI:
244- case MEK_DTPREL_LO:
245243 case MEK_GOT:
246244 case MEK_GOT_CALL:
247245 case MEK_GOT_DISP:
@@ -257,14 +255,16 @@ void MipsMCExpr::fixELFSymbolsInTLSFixups(MCAssembler &Asm) const {
257255 case MEK_NEG:
258256 case MEK_PCREL_HI16:
259257 case MEK_PCREL_LO16:
260- case MEK_TLSLDM:
261258 // If we do have nested target-specific expressions, they will be in
262259 // a consecutive chain.
263260 if (const MipsMCExpr *E = dyn_cast<const MipsMCExpr>(getSubExpr ()))
264261 E->fixELFSymbolsInTLSFixups (Asm);
265262 break ;
266- case MEK_GOTTPREL:
263+ case MEK_DTPREL_HI:
264+ case MEK_DTPREL_LO:
265+ case MEK_TLSLDM:
267266 case MEK_TLSGD:
267+ case MEK_GOTTPREL:
268268 case MEK_TPREL_HI:
269269 case MEK_TPREL_LO:
270270 fixELFSymbolsInTLSFixupsImpl (getSubExpr (), Asm);
Original file line number Diff line number Diff line change 1+ # RUN: llvm-mc -arch=mips < %s -position-independent -filetype=obj \
2+ # RUN: | llvm-readelf -symbols | FileCheck %s
3+ # RUN: llvm-mc -arch=mips < %s -filetype=obj | llvm-readelf -symbols \
4+ # RUN: | FileCheck %s
5+
6+ # Test that TLS relocations cause symbols to be marked as TLS symbols.
7+
8+ .set noat
9+ lui $3 , %tlsgd(foo1)
10+ lui $1 , %dtprel_hi(foo2)
11+ lui $1 , %dtprel_lo(foo3)
12+ lui $1 , %tprel_hi(foo4)
13+ lui $1 , %tprel_lo(foo5)
14+ lw $2 , %gottprel(foo6)($28 )
15+
16+ .hidden foo1
17+ .hidden foo2
18+ .hidden foo3
19+ .hidden foo4
20+ .hidden foo5
21+ .hidden foo6
22+
23+ # CHECK: 1: {{.+}} {{.+}} TLS GLOBAL HIDDEN UND foo1
24+ # CHECK: 2: {{.+}} {{.+}} TLS GLOBAL HIDDEN UND foo2
25+ # CHECK: 3: {{.+}} {{.+}} TLS GLOBAL HIDDEN UND foo3
26+ # CHECK: 4: {{.+}} {{.+}} TLS GLOBAL HIDDEN UND foo4
27+ # CHECK: 5: {{.+}} {{.+}} TLS GLOBAL HIDDEN UND foo5
28+ # CHECK: 6: {{.+}} {{.+}} TLS GLOBAL HIDDEN UND foo6
You can’t perform that action at this time.
0 commit comments