This is an archive of the discontinued LLVM Phabricator instance.

[LLD][ELF] Introduce range extension thunks for ARM
AbandonedPublic

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

Details

Reviewers
ruiu
rafael
Summary

This change adds a new function to Target that can be used to check whether a call is in range. On ARM we can now generate a range extension thunk if the call is out of range.

With this change the existing tests arm-branch-error.s and arm-thumb-branch-error.s now no longer fail with an out of range branch. These have been renamed and tests added for the range extension thunk.

I've made the check for range Target Specific as there are sometimes rules that make relocation ranges irregular such as the alignment of the place of a Thumb blx instruction, and the ARM pc-bias of two instructions.

Diff Detail

Event Timeline

peter.smith created this revision.Apr 4 2017, 4:31 AM
peter.smith updated this revision to Diff 94215.Apr 5 2017, 6:19 AM

Rebased to account for 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.

test/ELF/arm-branch-rangethunk.s