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.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 50a7b7522cc..395f1268d58 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -872,6 +872,15 @@ Expr ScriptParser::readPrimary() {
expect(")");
return [=](uint64_t Dot) { return getConstant(Tok); };
}
+ if (Tok == "SEGMENT_START") {
+ expect("(");
+ next();
+ expect(",");
+ uint64_t Val;
+ next().getAsInteger(0, Val);
+ expect(")");
+ return [=](uint64_t Dot) { return Val; };
+ }
if (Tok == "DATA_SEGMENT_ALIGN") {
expect("(");
Expr E = readExpr();
OpenPOWER on IntegriCloud