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.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index f255da3527f..4d05e10f7e4 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -212,6 +212,14 @@ void LinkerScript::readOutputFormat() {
// Error checking only for now.
expect("(");
next();
+ StringRef Tok = next();
+ if (Tok == ")")
+ return;
+ if (Tok != ",")
+ error("unexpected token: " + Tok);
+ next();
+ expect(",");
+ next();
expect(")");
}
OpenPOWER on IntegriCloud