diff options
Diffstat (limited to 'ELF/ScriptParser.cpp')
| -rw-r--r-- | ELF/ScriptParser.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ELF/ScriptParser.cpp b/ELF/ScriptParser.cpp index c1176ccfa8d5..4263944981f2 100644 --- a/ELF/ScriptParser.cpp +++ b/ELF/ScriptParser.cpp @@ -151,6 +151,7 @@ static ExprValue add(ExprValue A, ExprValue B) { } static ExprValue sub(ExprValue A, ExprValue B) { + // The distance between two symbols in sections is absolute. if (!A.isAbsolute() && !B.isAbsolute()) return A.getValue() - B.getValue(); return {A.Sec, false, A.getSectionOffset() - B.getValue(), A.Loc}; @@ -707,8 +708,6 @@ OutputSection *ScriptParser::readOutputSectionDescription(StringRef OutSec) { if (consume(">")) Cmd->MemoryRegionName = next(); - else if (peek().startswith(">")) - Cmd->MemoryRegionName = next().drop_front(); Cmd->Phdrs = readOutputSectionPhdrs(); |
