From e30c72b844bec93f6c197ea6c7c8cd0188964208 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 24 Dec 2017 14:05:16 +0000 Subject: Vendor import of lld trunk r321426: https://llvm.org/svn/llvm-project/lld/trunk@321426 --- ELF/LinkerScript.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ELF/LinkerScript.cpp') 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(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; } -- cgit v1.3