diff options
Diffstat (limited to 'ELF/LinkerScript.cpp')
-rw-r--r-- | ELF/LinkerScript.cpp | 2 |
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; } |