aboutsummaryrefslogtreecommitdiff
path: root/lld/ELF/LinkerScript.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-08-21 23:53:36 -0700
committerFangrui Song <i@maskray.me>2024-08-21 23:53:36 -0700
commitb4feb26606de84ff53d9b65a3b79c00a2b4d7c22 (patch)
tree3eafce646a73ce9e42e7c1ff963084d298658642 /lld/ELF/LinkerScript.cpp
parent5f6172f0684b6a224d207ff8d093fc9aad92e331 (diff)
downloadllvm-b4feb26606de84ff53d9b65a3b79c00a2b4d7c22.zip
llvm-b4feb26606de84ff53d9b65a3b79c00a2b4d7c22.tar.gz
llvm-b4feb26606de84ff53d9b65a3b79c00a2b4d7c22.tar.bz2
[ELF] Move target to Ctx. NFC
Ctx was introduced in March 2022 as a more suitable place for such singletons. Follow-up to driver (2022-10) and script (2024-08).
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
-rw-r--r--lld/ELF/LinkerScript.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 9ddda99..8bab26c 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -1487,7 +1487,7 @@ LinkerScript::assignAddresses() {
dot = config->imageBase.value_or(0);
} else {
// Assign addresses to headers right now.
- dot = target->getImageBase();
+ dot = ctx.target->getImageBase();
ctx.out.elfHeader->addr = dot;
ctx.out.programHeaders->addr = dot + ctx.out.elfHeader->size;
dot += getHeaderSize();