This is an archive of the discontinued LLVM Phabricator instance.

[COFF][ARM] Error out if 24 bit thumb branches are out of range
ClosedPublic

Authored by mstorsjo on Aug 4 2016, 2:12 AM.

Details

Summary

In the ELF linker, the same situation already errors out with "relocation R_ARM_THM_CALL out of range".

Diff Detail

Event Timeline

mstorsjo updated this revision to Diff 66773.Aug 4 2016, 2:12 AM
mstorsjo retitled this revision from to [COFF][ARM] Error out if 24 bit thumb branches are out of range.
mstorsjo updated this object.
mstorsjo added reviewers: peter.smith, zatrazz.
mstorsjo added a subscriber: llvm-commits.
ruiu edited edge metadata.Aug 4 2016, 2:03 PM

LGTM

COFF/Chunks.cpp
119–120

This does not depend on none of S, J1 nor J2, so please move this to the beginning of this function.

ruiu accepted this revision.Aug 4 2016, 2:03 PM
ruiu edited edge metadata.
This revision is now accepted and ready to land.Aug 4 2016, 2:03 PM
davide added a subscriber: davide.Aug 4 2016, 5:26 PM

ehm, do you have a testcase?

mstorsjo added inline comments.Aug 4 2016, 10:58 PM
COFF/Chunks.cpp
119–120

Ok, moving it up

mstorsjo updated this revision to Diff 66910.Aug 4 2016, 11:01 PM
mstorsjo edited edge metadata.

Moved the check up in the function as requested, added a test based on ELF/arm-thumb-branch-error.s.

davide accepted this revision.Aug 5 2016, 1:21 AM
davide added a reviewer: davide.

LGTM

Can someone commit this one, now that it has no objections and a bunch of approvals? I don't have commit access.

(The diff is generated on top of some of the other patches touching code close by, but they shouldn't directly conflict.)

compnerd closed this revision.Aug 5 2016, 10:41 AM
compnerd added a subscriber: compnerd.

SVN r277838