diff options
-rw-r--r-- | lld/ELF/SyntheticSections.cpp | 8 | ||||
-rw-r--r-- | lld/test/ELF/gc-debuginfo-tls.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/mips-tls-64.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/mips-tls-hilo.s | 2 | ||||
-rw-r--r-- | lld/test/ELF/mips-tls.s | 2 |
5 files changed, 4 insertions, 12 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 6bd195f2fb4..eb717e81374 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -1376,14 +1376,6 @@ template <class ELFT> void SymbolTableSection<ELFT>::writeTo(uint8_t *Buf) { if (const OutputSection *OutSec = Body->getOutputSection<ELFT>()) { ESym->st_shndx = OutSec->SectionIndex; - - // This piece of code should go away as it doesn't make sense, - // but we want to keep it tentatively because some tests for TLS - // variable depends on this. We should fix the test and remove - // this code. - if (Body->isLocal()) - if (auto *DS = dyn_cast<DefinedRegular<ELFT>>(Body)) - ESym->st_value = OutSec->Addr + DS->Section->getOffset(*DS); } else if (isa<DefinedRegular<ELFT>>(Body)) { ESym->st_shndx = SHN_ABS; } else if (isa<DefinedCommon>(Body)) { diff --git a/lld/test/ELF/gc-debuginfo-tls.s b/lld/test/ELF/gc-debuginfo-tls.s index 9e43bfea6d1..d1a250b9c94 100644 --- a/lld/test/ELF/gc-debuginfo-tls.s +++ b/lld/test/ELF/gc-debuginfo-tls.s @@ -6,7 +6,7 @@ # NOGC: Symbol { # NOGC: Name: patatino -# NOGC-NEXT: Value: 0x1000 +# NOGC-NEXT: Value: 0x0 # NOGC-NEXT: Size: 0 # NOGC-NEXT: Binding: Local # NOGC-NEXT: Type: TLS diff --git a/lld/test/ELF/mips-tls-64.s b/lld/test/ELF/mips-tls-64.s index 764d689a7ee..db29789ee11 100644 --- a/lld/test/ELF/mips-tls-64.s +++ b/lld/test/ELF/mips-tls-64.s @@ -29,7 +29,7 @@ # DIS-NEXT: 30040 00000000 00000000 00000000 00000001 # DIS-NEXT: 30050 ffffffff ffff8004 ffffffff ffff9004 -# DIS: 0000000000040000 l .tdata 00000000 loc +# DIS: 0000000000000000 l .tdata 00000000 loc # DIS: 0000000000000004 g .tdata 00000000 bar # DIS: 0000000000000000 g *UND* 00000000 foo diff --git a/lld/test/ELF/mips-tls-hilo.s b/lld/test/ELF/mips-tls-hilo.s index 9e37c157cd8..47fadaa34b8 100644 --- a/lld/test/ELF/mips-tls-hilo.s +++ b/lld/test/ELF/mips-tls-hilo.s @@ -21,7 +21,7 @@ # DIS-NEXT: 2000c: 24 62 90 00 addiu $2, $3, -28672 # %lo(loc0 - .tdata - 0x7000) --^ -# DIS: 00040000 l .tdata 00000000 loc0 +# DIS: 00000000 l .tdata 00000000 loc0 # CHECK: Relocations [ # CHECK-NEXT: ] diff --git a/lld/test/ELF/mips-tls.s b/lld/test/ELF/mips-tls.s index 209e7a8aa64..b64f8db7573 100644 --- a/lld/test/ELF/mips-tls.s +++ b/lld/test/ELF/mips-tls.s @@ -27,7 +27,7 @@ # DIS-NEXT: 30020 00000000 00000001 00000000 00000001 # DIS-NEXT: 30030 ffff8004 ffff9004 -# DIS: 00040000 l .tdata 00000000 loc +# DIS: 00000000 l .tdata 00000000 loc # DIS: 00000004 g .tdata 00000000 bar # DIS: 00000000 g *UND* 00000000 foo |