aboutsummaryrefslogtreecommitdiffstats
path: root/ELF/LinkerScript.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-12-24 14:05:16 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-12-24 14:05:16 +0000
commite30c72b844bec93f6c197ea6c7c8cd0188964208 (patch)
tree1d71fce50e0553f474b76ee72ce01aa497f4947b /ELF/LinkerScript.cpp
parent0d9ba4fe26725cacc7253fc3c72c4574f26bc099 (diff)
downloadsrc-e30c72b844bec93f6c197ea6c7c8cd0188964208.tar.gz
src-e30c72b844bec93f6c197ea6c7c8cd0188964208.zip
Vendor import of lld trunk r321426:vendor/lld/lld-trunk-r321426
Notes
Notes: svn path=/vendor/lld/dist/; revision=327158 svn path=/vendor/lld/lld-trunk-r321426/; revision=327159; tag=vendor/lld/lld-trunk-r321426
Diffstat (limited to 'ELF/LinkerScript.cpp')
-rw-r--r--ELF/LinkerScript.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/ELF/LinkerScript.cpp b/ELF/LinkerScript.cpp
index 91873e318f54..8f50a977fd75 100644
--- a/ELF/LinkerScript.cpp
+++ b/ELF/LinkerScript.cpp
@@ -693,6 +693,8 @@ void LinkerScript::assignOffsets(OutputSection *Sec) {
if (auto *Cmd = dyn_cast<ByteCommand>(Base)) {
Cmd->Offset = Dot - Ctx->OutSec->Addr;
Dot += Cmd->Size;
+ if (Ctx->MemRegion)
+ Ctx->MemRegionOffset[Ctx->MemRegion] += Cmd->Size;
Ctx->OutSec->Size = Dot - Ctx->OutSec->Addr;
continue;
}