diff options
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r-- | lld/ELF/Writer.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 2b0e097..4fa8039 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1541,8 +1541,10 @@ template <class ELFT> void Writer<ELFT>::finalizeAddressDependentContent() { if (ctx.arg.randomizeSectionPadding) randomizeSectionPadding(ctx); + // Iterate until a fixed point is reached, skipping relocatable links since + // the final addresses are unavailable. uint32_t pass = 0, assignPasses = 0; - for (;;) { + while (!ctx.arg.relocatable) { bool changed = ctx.target->needsThunks ? tc.createThunks(pass, ctx.outputSections) : ctx.target->relaxOnce(pass); |