[lld] r287701 - move VerDef finalization before DynStrTab
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 22 13:12:21 PST 2016
Author: rafael
Date: Tue Nov 22 15:12:20 2016
New Revision: 287701
URL: http://llvm.org/viewvc/llvm-project?rev=287701&view=rev
Log:
move VerDef finalization before DynStrTab
Modified:
lld/trunk/ELF/Writer.cpp
lld/trunk/test/ELF/empty-ver.s
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=287701&r1=287700&r2=287701&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Nov 22 15:12:20 2016
@@ -952,11 +952,11 @@ template <class ELFT> void Writer<ELFT>:
// symbol table section (DynSymTab) must be the first one.
finalizeSynthetic<ELFT>(
{In<ELFT>::DynSymTab, In<ELFT>::GnuHashTab, In<ELFT>::HashTab,
- In<ELFT>::SymTab, In<ELFT>::ShStrTab, In<ELFT>::StrTab,
+ In<ELFT>::SymTab, In<ELFT>::ShStrTab, In<ELFT>::StrTab, In<ELFT>::VerDef,
In<ELFT>::DynStrTab, In<ELFT>::GdbIndex, In<ELFT>::Got,
In<ELFT>::MipsGot, In<ELFT>::GotPlt, In<ELFT>::RelaDyn,
- In<ELFT>::RelaPlt, In<ELFT>::Plt, In<ELFT>::EhFrameHdr, In<ELFT>::VerDef,
- In<ELFT>::VerSym, In<ELFT>::VerNeed, In<ELFT>::Dynamic});
+ In<ELFT>::RelaPlt, In<ELFT>::Plt, In<ELFT>::EhFrameHdr, In<ELFT>::VerSym,
+ In<ELFT>::VerNeed, In<ELFT>::Dynamic});
}
template <class ELFT> bool Writer<ELFT>::needsGot() {
Modified: lld/trunk/test/ELF/empty-ver.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/empty-ver.s?rev=287701&r1=287700&r2=287701&view=diff
==============================================================================
--- lld/trunk/test/ELF/empty-ver.s (original)
+++ lld/trunk/test/ELF/empty-ver.s Tue Nov 22 15:12:20 2016
@@ -1,7 +1,16 @@
// REQUIRES: x86
// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
// RUN: ld.lld %t.o -o %t.so -shared -version-script %p/Inputs/empty-ver.ver
-// RUN: llvm-readobj -version-info %t.so | FileCheck %s
+// RUN: llvm-readobj -s -version-info %t.so | FileCheck %s
+
+// CHECK: Name: .dynstr
+// CHECK-NEXT: Type: SHT_STRTAB
+// CHECK-NEXT: Flags [
+// CHECK-NEXT: SHF_ALLOC
+// CHECK-NEXT: ]
+// CHECK-NEXT: Address:
+// CHECK-NEXT: Offset:
+// CHECK-NEXT: Size: 81
// CHECK: Version symbols {
// CHECK-NEXT: Section Name:
More information about the llvm-commits
mailing list