This is an archive of the discontinued LLVM Phabricator instance.

[LLD][ELF] Account for range thunk that has drifted out of range
AbandonedPublic

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

Details

Reviewers
ruiu
rafael
Summary

Adding range extension thunks to an OutputSection alters some InputSection VAs, including the VAs of the thunks themselves. In rare cases a call to a thunk that was valid on pass N, is not valid in some later pass N + K. We account for this by detecting if a caller can't reach the thunk, reseting the relocation to the original and recreating the Thunk.

Diff Detail

Event Timeline

peter.smith created this revision.Apr 4 2017, 4:34 AM
peter.smith updated this revision to Diff 94216.Apr 5 2017, 6:23 AM

Rebased to take account of changes in D31654

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

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