diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-28 21:23:25 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-28 21:23:25 +0000 |
commit | ae1a339de31cf4065777531959a11e55a2e5fa00 (patch) | |
tree | ae204c76257fe2799a8fdc5fcb12a2523805c7c8 /ELF/ScriptParser.cpp | |
parent | e30c72b844bec93f6c197ea6c7c8cd0188964208 (diff) |
Notes
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(); |