summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/ELF/Writer.cpp3
-rw-r--r--lld/test/ELF/relocatable-ehframe.s6
2 files changed, 2 insertions, 7 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 6290df7a2d8..77548ab3579 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -557,9 +557,6 @@ template <class ELFT> void Writer<ELFT>::copyLocalSymbols() {
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)
diff --git a/lld/test/ELF/relocatable-ehframe.s b/lld/test/ELF/relocatable-ehframe.s
index 5ca9472671b..d48402099c3 100644
--- a/lld/test/ELF/relocatable-ehframe.s
+++ b/lld/test/ELF/relocatable-ehframe.s
@@ -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 [
OpenPOWER on IntegriCloud