This is an archive of the discontinued LLVM Phabricator instance.

[LLD][ELF] Make createThunks() iterate until no more thunks added
AbandonedPublic

Authored by peter.smith on Apr 4 2017, 4:00 AM.

Details

Reviewers
ruiu
rafael
Summary

We now continually call createThunks() until no more thunks are added. This requires us to record the thunks we add on each pass and only merge these into the OutputSection. We also need to check if a Relocation is targeting a thunk to prevent us from infinitely creating more thunks.

With the existing thunks we allocate all the thunks on the first pass, the second pass will not result in any more thunks. When range extension thunks are introduced we will need more passes.

Diff Detail

Event Timeline

peter.smith created this revision.Apr 4 2017, 4:00 AM
peter.smith updated this revision to Diff 94191.Apr 5 2017, 4:22 AM

Rebased patch after earlier changes made to D31654

peter.smith abandoned this revision.May 16 2017, 7:34 AM

I'm abandoning the range thunks implementation that inserts into OutputSections in favour of an implementation that inserts into InputSectionDescription.