summaryrefslogtreecommitdiffstats
path: root/lld/ELF/LinkerScript.cpp
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2018-07-05 10:44:17 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2018-07-05 10:44:17 +0000
commit9b99abcf99956118fd0e13fcb50e510bf68e1134 (patch)
tree129bcb96aa852ec3d22baecfb65f8806564d5783 /lld/ELF/LinkerScript.cpp
parent13f9425e3a9afc8e8bfa6314de1a4a1d266d9a76 (diff)
downloadbcm5719-llvm-9b99abcf99956118fd0e13fcb50e510bf68e1134.tar.gz
bcm5719-llvm-9b99abcf99956118fd0e13fcb50e510bf68e1134.zip
[ELF] - Advance position in a memory region when change the Dot.
This is https://bugs.llvm.org//show_bug.cgi?id=37836 Previously LLD could assign to Dot or set the address for the section with address expression but did not advance the position in a memory region. Patch fixes the issue. llvm-svn: 336335
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
-rw-r--r--lld/ELF/LinkerScript.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 3e3fe31570d..07697ec37f5 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -135,6 +135,9 @@ void LinkerScript::setDot(Expr E, const Twine &Loc, bool InSec) {
// Update to location counter means update to section size.
if (InSec)
expandOutputSection(Val - Dot);
+ else
+ expandMemoryRegions(Val - Dot);
+
Dot = Val;
}
OpenPOWER on IntegriCloud