[PATCH] D34034: [LLD][ELF] Make createThunks() iterate until no more thunks added
Rafael Avila de Espindola via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 14 11:34:00 PDT 2017
> Index: ELF/Relocations.cpp
> ===================================================================
> --- ELF/Relocations.cpp
> +++ ELF/Relocations.cpp
> @@ -1009,8 +1009,7 @@
> if ((IS->Flags & SHF_EXECINSTR) == 0)
> break;
> }
> - CurTS = make<ThunkSection>(OS, Off);
> - ThunkSections[ISR].push_back(CurTS);
> + CurTS = addThunkSection(OS, ISR, Off);
> }
> return CurTS;
> }
> @@ -1035,11 +1034,20 @@
> break;
> }
> }
> - ThunkSections[Range].push_back(TS);
> + TS = addThunkSection(TOS, Range, IS->OutSecOff);
The code still has
TS = make<ThunkSection>(TOS, IS->OutSecOff);
so now we create an extra thunk, no?
Cheers,
Rafael
More information about the llvm-commits
mailing list