Skip to content

Commit 67c0846

Browse files
committed
[ELF] Don't call getPPC64TargetInfo outside Driver. NFC
getPPC64TargetInfo should only be called once per link invocation.
1 parent 20e37f0 commit 67c0846

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lld/ELF/SyntheticSections.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,7 @@ DynamicSection<ELFT>::computeContents() {
15711571
}
15721572

15731573
if (ctx.arg.emachine == EM_PPC64)
1574-
addInt(DT_PPC64_OPT, getPPC64TargetInfo(ctx)->ppc64DynamicSectionOpt);
1574+
addInt(DT_PPC64_OPT, ctx.target->ppc64DynamicSectionOpt);
15751575

15761576
addInt(DT_NULL, 0);
15771577
return entries;

lld/ELF/Thunks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,7 @@ static Thunk *addThunkPPC64(Ctx &ctx, RelType type, Symbol &s, int64_t a) {
15391539
// If we are emitting stubs for NOTOC relocations, we need to tell
15401540
// the PLT resolver that there can be multiple TOCs.
15411541
if (type == R_PPC64_REL24_NOTOC)
1542-
getPPC64TargetInfo(ctx)->ppc64DynamicSectionOpt = 0x2;
1542+
ctx.target->ppc64DynamicSectionOpt = 0x2;
15431543

15441544
if (s.isInPlt())
15451545
return type == R_PPC64_REL24_NOTOC

0 commit comments

Comments
 (0)