Skip to content

Commit 15225ee

Browse files
committed
Use ctx.arg instead of config
1 parent 5fab582 commit 15225ee

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lld/ELF/Relocations.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,13 +934,14 @@ void elf::addGotEntry(Ctx &ctx, Symbol &sym) {
934934

935935
// If preemptible, emit a GLOB_DAT relocation.
936936
if (sym.isPreemptible) {
937-
RelType gotRel = target->gotRel;
937+
RelType gotRel = ctx.target->gotRel;
938938
if (sym.hasFlag(NEEDS_GOT_AUTH)) {
939939
assert(ctx.arg.emachine == EM_AARCH64);
940940
gotRel = R_AARCH64_AUTH_GLOB_DAT;
941941
}
942-
ctx.mainPart->relaDyn->addReloc({gotRel, in.got.get(), off,
943-
DynamicReloc::AgainstSymbol, sym, 0, R_ABS});
942+
ctx.mainPart->relaDyn->addReloc({gotRel, ctx.in.got.get(), off,
943+
DynamicReloc::AgainstSymbol, sym, 0,
944+
R_ABS});
944945
return;
945946
}
946947

lld/ELF/SyntheticSections.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ void GotSection::addEntry(const Symbol &sym) {
665665
assert(sym.auxIdx == ctx.symAux.size() - 1);
666666
ctx.symAux.back().gotIdx = numEntries++;
667667
if (sym.hasFlag(NEEDS_GOT_AUTH))
668-
authEntries.push_back({(numEntries - 1) * config->wordsize, sym.isFunc()});
668+
authEntries.push_back({(numEntries - 1) * ctx.arg.wordsize, sym.isFunc()});
669669
}
670670

671671
bool GotSection::addTlsDescEntry(const Symbol &sym) {

0 commit comments

Comments
 (0)