[PATCH] D29861: ELF: Read all dynamic lists specified on the command line.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 13 10:42:52 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL294977: ELF: Read all dynamic lists specified on the command line. (authored by pcc).
Changed prior to commit:
https://reviews.llvm.org/D29861?vs=88082&id=88225#toc
Repository:
rL LLVM
https://reviews.llvm.org/D29861
Files:
lld/trunk/ELF/Driver.cpp
lld/trunk/ELF/LinkerScript.cpp
lld/trunk/test/ELF/dynamic-list.s
Index: lld/trunk/ELF/LinkerScript.cpp
===================================================================
--- lld/trunk/ELF/LinkerScript.cpp
+++ lld/trunk/ELF/LinkerScript.cpp
@@ -1942,7 +1942,8 @@
if (peek() != "local") {
if (consume("global"))
expect(":");
- Config->VersionScriptGlobals = readSymbols();
+ for (SymbolVersion V : readSymbols())
+ Config->VersionScriptGlobals.push_back(V);
}
readLocals();
expect("}");
Index: lld/trunk/ELF/Driver.cpp
===================================================================
--- lld/trunk/ELF/Driver.cpp
+++ lld/trunk/ELF/Driver.cpp
@@ -643,7 +643,7 @@
for (auto *Arg : Args.filtered(OPT_undefined))
Config->Undefined.push_back(Arg->getValue());
- if (auto *Arg = Args.getLastArg(OPT_dynamic_list))
+ for (auto *Arg : Args.filtered(OPT_dynamic_list))
if (Optional<MemoryBufferRef> Buffer = readFile(Arg->getValue()))
readDynamicList(*Buffer);
Index: lld/trunk/test/ELF/dynamic-list.s
===================================================================
--- lld/trunk/test/ELF/dynamic-list.s
+++ lld/trunk/test/ELF/dynamic-list.s
@@ -51,6 +51,10 @@
# RUN: echo "{ foo1; foo2; foo31; };" > %t.list
# RUN: ld.lld --dynamic-list %t.list %t %t2.so -o %t.exe
# RUN: llvm-readobj -dyn-symbols %t.exe | FileCheck -check-prefix=CHECK2 %s
+# RUN: echo "{ foo1; foo2; };" > %t1.list
+# RUN: echo "{ foo31; };" > %t2.list
+# RUN: ld.lld --dynamic-list %t1.list --dynamic-list %t2.list %t %t2.so -o %t.exe
+# RUN: llvm-readobj -dyn-symbols %t.exe | FileCheck -check-prefix=CHECK2 %s
# CHECK2: DynamicSymbols [
# CHECK2-NEXT: Symbol {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29861.88225.patch
Type: text/x-patch
Size: 1641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170213/411a00be/attachment.bin>
More information about the llvm-commits
mailing list