aboutsummaryrefslogtreecommitdiff
path: root/lld
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2020-09-16 14:03:34 -0700
committerFangrui Song <maskray@google.com>2020-09-16 14:05:22 -0700
commit15f0ad2fa29beaf1dad1548ccb97c2c729ea53cd (patch)
tree3c46a56efb92558a12fb455fa27b01b51354a18d /lld
parentcd13476ab57b43b66831bba14206a350c5a4a81b (diff)
downloadllvm-15f0ad2fa29beaf1dad1548ccb97c2c729ea53cd.zip
llvm-15f0ad2fa29beaf1dad1548ccb97c2c729ea53cd.tar.gz
llvm-15f0ad2fa29beaf1dad1548ccb97c2c729ea53cd.tar.bz2
[ELF] Bump the limit of thunk creation passes from 10 to 15
I have noticed that a 374MiB powerpc64le 'ld.lld' requires 11 passes to link. There is a ThunkSection (whose parent OutputSection is ".text" of 169MiB) with 12867 thunks.
Diffstat (limited to 'lld')
-rw-r--r--lld/ELF/Writer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 5ef37e9..f42686f 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -1701,8 +1701,8 @@ template <class ELFT> void Writer<ELFT>::finalizeAddressDependentContent() {
bool changed = target->needsThunks && tc.createThunks(outputSections);
// With Thunk Size much smaller than branch range we expect to
- // converge quickly; if we get to 10 something has gone wrong.
- if (changed && tc.pass >= 10) {
+ // converge quickly; if we get to 15 something has gone wrong.
+ if (changed && tc.pass >= 15) {
error("thunk creation not converged");
break;
}