[lld] r263244 - Don't invent names for STT_SECTION symbols.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 11 06:57:33 PST 2016
Author: rafael
Date: Fri Mar 11 08:57:33 2016
New Revision: 263244
URL: http://llvm.org/viewvc/llvm-project?rev=263244&view=rev
Log:
Don't invent names for STT_SECTION symbols.
We should just copy the symbol names with -r.
Modified:
lld/trunk/ELF/Writer.cpp
lld/trunk/test/ELF/relocatable-ehframe.s
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=263244&r1=263243&r2=263244&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Fri Mar 11 08:57:33 2016
@@ -557,9 +557,6 @@ template <class ELFT> void Writer<ELFT>:
InputSectionBase<ELFT> *Section = F->getSection(Sym);
if (!Section->Live)
continue;
- // That can happen if creating relocatable output.
- if (Sym.getType() == STT_SECTION)
- SymName = Section->getSectionName();
}
++Out<ELFT>::SymTab->NumLocals;
if (Config->Relocatable)
Modified: lld/trunk/test/ELF/relocatable-ehframe.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocatable-ehframe.s?rev=263244&r1=263243&r2=263244&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocatable-ehframe.s (original)
+++ lld/trunk/test/ELF/relocatable-ehframe.s Fri Mar 11 08:57:33 2016
@@ -10,15 +10,13 @@
# CHECK-NEXT: ]
# CHECK-NEXT: Address:
# CHECK-NEXT: Offset
-# CHECK-NEXT: Size: 35
+# CHECK-NEXT: Size: 9
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
# CHECK-NEXT: AddressAlignment: 1
# CHECK-NEXT: EntrySize: 0
# CHECK-NEXT: SectionData (
-# CHECK-NEXT: 0000: 00666F6F 00626172 00646168 00666F6F |.foo.bar.dah.foo|
-# CHECK-NEXT: 0010: 31006261 72310064 61683100 5F737461 |1.bar1.dah1._sta|
-# CHECK-NEXT: 0020: 727400 |rt.|
+# CHECK-NEXT: 0000: 00005F73 74617274 00 |.._start.|
# CHECK-NEXT: )
# CHECK: Relocations [
More information about the llvm-commits
mailing list