This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Fix r_aarch64_prelxx test
ClosedPublic

Authored by yavtuk on Apr 22 2022, 9:36 AM.

Details

Summary

The relocation value is calculated using the formula S + A - P,
the verification of the value is performed by inversely calculating the location address

Diff Detail

Event Timeline

yavtuk created this revision.Apr 22 2022, 9:36 AM
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
yavtuk requested review of this revision.Apr 22 2022, 9:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2022, 9:36 AM

@yota9 @rafaelauler @Amir hi folks, maybe you know how to check it easier?

yavtuk updated this revision to Diff 424511.Apr 22 2022, 9:48 AM
Amir added a comment.EditedApr 22 2022, 9:59 AM

@yota9 @rafaelauler @Amir hi folks, maybe you know how to check it easier?

No easy way unfortunately. I'll pick up this patch and build/test manually on the buildbot then post the result here.

UPD: just noticed that the test doesn't run the binary. Please move this test from bolt/test/runtime/AArch64 to bolt/test/AArch64 and it would be picked up on X86 hosts and pre-merge checks.

@Amir thanks, please wait some time, I need to add alignment for data section

yavtuk updated this revision to Diff 424541.Apr 22 2022, 11:01 AM
Amir added a comment.Apr 22 2022, 11:51 AM

@yavtuk:
Can you please move this test from bolt/test/runtime/AArch64 to bolt/test/AArch64? It would be tested in pre-merge checks run.

Amir retitled this revision from [BOLT] fixed r_aarch64_prelxx test to [BOLT] Fix r_aarch64_prelxx test.Apr 22 2022, 12:11 PM
yavtuk updated this revision to Diff 424780.Apr 24 2022, 6:00 AM
yota9 added inline comments.Apr 24 2022, 6:55 AM
bolt/test/AArch64/r_aarch64_prelxx.s
11 ↗(On Diff #424780)

Please add -mlittle-endian flag

yavtuk updated this revision to Diff 424822.Apr 24 2022, 11:32 PM
Amir accepted this revision.Apr 25 2022, 5:20 AM

LGTM

PASS: BOLT :: AArch64/r_aarch64_prelxx.s (20 of 169)

This revision is now accepted and ready to land.Apr 25 2022, 5:20 AM
This revision was automatically updated to reflect the committed changes.