This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Testcase to repro R_X86_64_REX_GOTPCRELX bug
ClosedPublic

Authored by rafauler on May 17 2022, 5:01 PM.

Details

Summary

Add a new testcase that reproduces a bug when BOLTing current
trunk LLD bootstrapped with trunk clang. This makes it official
that we do not support this transformation but are working on
it. When the support is ready, XFAIL should be removed.

Diff Detail

Event Timeline

rafauler created this revision.May 17 2022, 5:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2022, 5:01 PM
rafauler requested review of this revision.May 17 2022, 5:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2022, 5:01 PM
rafauler retitled this revision from Testcase to repro R_X86_64_REX_GOTPCRELX bug to [bolt] Testcase to repro R_X86_64_REX_GOTPCRELX bug.May 17 2022, 5:01 PM
rafauler retitled this revision from [bolt] Testcase to repro R_X86_64_REX_GOTPCRELX bug to [BOLT] Testcase to repro R_X86_64_REX_GOTPCRELX bug.
rafauler edited the summary of this revision. (Show Details)
Amir accepted this revision.May 18 2022, 8:06 AM

LGTM with one comment

bolt/test/X86/gotpcrelx.s
4

Can we also check the presence of R_X86_64_REX_GOTPCRELX relocation in the input binary?

This revision is now accepted and ready to land.May 18 2022, 8:06 AM
yota9 accepted this revision.May 18 2022, 8:15 AM

LGTM
AFAIU this might be the first time where the skipRelocationProcess that I'm using for arm might be used for x86

rafauler updated this revision to Diff 430478.May 18 2022, 12:44 PM

Thanks, I appreciate the suggestions. Adding check for GOTPCRELX.

maksfb accepted this revision.May 18 2022, 1:36 PM

Thanks, Rafael, for adding the test case.

This revision was automatically updated to reflect the committed changes.