This is an archive of the discontinued LLVM Phabricator instance.

[JITLink][AArch32] Implement ELF::R_ARM_JUMP24
ClosedPublic

Authored by Eymay on Aug 9 2023, 12:21 PM.

Details

Summary

Added support and test for ELF::R_ARM_JUMP24

Diff Detail

Event Timeline

Eymay created this revision.Aug 9 2023, 12:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2023, 12:21 PM
Eymay requested review of this revision.Aug 9 2023, 12:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 9 2023, 12:21 PM

Thanks!

Is the test actually working right now? Since we always use indirection stubs and we only have a Thumb implementation right now, my quick assumption was that the TargetSymbol should always have the ThumbSymbol flag set (and thus always bail out). Maybe I find the time in the next days to look into it myself and give some informed feedback.

llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
412

Nit: bridging to Thumb

Eymay added a comment.Aug 11 2023, 7:20 AM

Thanks!

Is the test actually working right now? Since we always use indirection stubs and we only have a Thumb implementation right now, my quick assumption was that the TargetSymbol should always have the ThumbSymbol flag set (and thus always bail out). Maybe I find the time in the next days to look into it myself and give some informed feedback.

Yes it passes on my machine. I observe that TargetSymbol.hasTargetFlags(ThumbSymbol) outputs "0" in applyFixupArm so that might be the reason for not bailing out.

I think this can land as soon as the test fits with the (now) existing ELF_static_arm_reloc.s and your previous patch is in.

Eymay updated this revision to Diff 556553.Sep 12 2023, 5:14 AM

Updated test and squashed commits.

Eymay updated this revision to Diff 556648.Sep 13 2023, 3:51 AM

(NFC) Correct error message

Eymay marked an inline comment as done.Sep 13 2023, 3:51 AM
Eymay updated this revision to Diff 556664.Sep 13 2023, 7:25 AM

Update author email.

Eymay updated this revision to Diff 556665.Sep 13 2023, 7:31 AM

Update jitlink-check condition as an explicit offset similar to the change in D157533

Thanks LGTM! Let me double-check the tests on my machine and land this for you.

sgraenitz accepted this revision.Sep 13 2023, 7:33 AM
This revision is now accepted and ready to land.Sep 13 2023, 7:33 AM
This revision was landed with ongoing or failed builds.Sep 13 2023, 8:17 AM
This revision was automatically updated to reflect the committed changes.