openbsd-ports/devel/llvm/patches/patch-tools_lld_ELF_LinkerScript_cpp
jca 2794487c37 Update to llvm-10.0.0
Positive feedback from landry@
2020-08-05 06:49:48 +00:00

24 lines
780 B
Plaintext

$OpenBSD: patch-tools_lld_ELF_LinkerScript_cpp,v 1.4 2020/08/05 06:49:49 jca Exp $
- XXX no comment
Index: tools/lld/ELF/LinkerScript.cpp
--- tools/lld/ELF/LinkerScript.cpp.orig
+++ tools/lld/ELF/LinkerScript.cpp
@@ -822,13 +822,13 @@ void LinkerScript::assignOffsets(OutputSection *sec) {
expandMemoryRegion(ctx->memRegion, dot - ctx->memRegion->curPos,
ctx->memRegion->name, sec->name);
- switchTo(sec);
-
if (sec->lmaExpr)
ctx->lmaOffset = sec->lmaExpr().getValue() - dot;
if (MemoryRegion *mr = sec->lmaRegion)
ctx->lmaOffset = mr->curPos - dot;
+
+ switchTo(sec);
// If neither AT nor AT> is specified for an allocatable section, the linker
// will set the LMA such that the difference between VMA and LMA for the