2023-08-16 22:26:55 +00:00
|
|
|
- XXX no comment
|
|
|
|
|
2023-09-08 05:21:37 +00:00
|
|
|
Index: lld/ELF/LinkerScript.cpp
|
|
|
|
--- lld/ELF/LinkerScript.cpp.orig
|
|
|
|
+++ lld/ELF/LinkerScript.cpp
|
2023-08-16 22:26:55 +00:00
|
|
|
@@ -954,7 +954,6 @@ void LinkerScript::assignOffsets(OutputSection *sec) {
|
|
|
|
ctx->memRegion->name, sec->name);
|
|
|
|
}
|
|
|
|
|
|
|
|
- switchTo(sec);
|
|
|
|
|
|
|
|
// ctx->lmaOffset is LMA minus VMA. If LMA is explicitly specified via AT() or
|
|
|
|
// AT>, recompute ctx->lmaOffset; otherwise, if both previous/current LMA
|
|
|
|
@@ -968,6 +967,8 @@ void LinkerScript::assignOffsets(OutputSection *sec) {
|
|
|
|
ctx->lmaOffset = alignTo(mr->curPos, sec->alignment) - dot;
|
|
|
|
else if (!sameMemRegion || !prevLMARegionIsDefault)
|
|
|
|
ctx->lmaOffset = 0;
|
|
|
|
+
|
|
|
|
+ switchTo(sec);
|
|
|
|
|
|
|
|
// Propagate ctx->lmaOffset to the first "non-header" section.
|
|
|
|
if (PhdrEntry *l = ctx->outSec->ptLoad)
|