summaryrefslogtreecommitdiffstats
path: root/lld/ELF/LinkerScript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
-rw-r--r--lld/ELF/LinkerScript.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index f62cdcea12c..50ce95506c8 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -987,6 +987,7 @@ public:
void readLinkerScript();
void readVersionScript();
+ void readDynamicList();
private:
void addFile(StringRef Path);
@@ -1040,6 +1041,13 @@ private:
std::vector<std::unique_ptr<MemoryBuffer>> OwningMBs;
};
+void ScriptParser::readDynamicList() {
+ expect("{");
+ readAnonymousDeclaration();
+ if (!atEOF())
+ setError("EOF expected, but got " + next());
+}
+
void ScriptParser::readVersionScript() {
readVersionScriptCommand();
if (!atEOF())
@@ -1932,7 +1940,7 @@ std::vector<SymbolVersion> ScriptParser::readVersionExtern() {
StringRef Tok = next();
bool IsCXX = Tok == "\"C++\"";
if (!IsCXX && Tok != "\"C\"")
- setError("Unknown Language");
+ setError("Unknown language");
expect("{");
std::vector<SymbolVersion> Ret;
@@ -1956,6 +1964,10 @@ void elf::readVersionScript(MemoryBufferRef MB) {
ScriptParser(MB).readVersionScript();
}
+void elf::readDynamicList(MemoryBufferRef MB) {
+ ScriptParser(MB).readDynamicList();
+}
+
template class elf::LinkerScript<ELF32LE>;
template class elf::LinkerScript<ELF32BE>;
template class elf::LinkerScript<ELF64LE>;
OpenPOWER on IntegriCloud