ELF: Read all dynamic lists specified on the command line.
We were previously only reading the last one.
Fixes PR31939 (which was likely the issue underlying
https://github.com/google/oss-fuzz/issues/295).
Differential Revision: https://reviews.llvm.org/D29861
llvm-svn: 294977
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 15acaf0..a0b8530 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/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("}");