Page MenuHomePhabricator

[ELF] - Process R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX relocations.

Authored by grimar on Mar 20 2016, 3:00 AM.



That should fix the Bug 26995 - [regression] unrecognized reloc 42 (

R_X86_64_GOTPCRELX and R_X86_64_REX_GOTPCRELX relocations were added in latest ABI:

They should be generated instead of R_X86_64_GOTPCREL for cases when relaxation is possible.
Currently this patch just process them in the same way like R_X86_64_GOTPCREL. That should work for now
and we can implement relaxations later.

Patch implementing relaxations was posted before and on review now (

There is no testcases provided as I think there is no way to generate such relocations using llvm-mc atm.

Diff Detail


Event Timeline

grimar updated this revision to Diff 51125.Mar 20 2016, 3:00 AM
grimar retitled this revision from to [ELF] - Process R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX relocations..
grimar updated this object.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar.

Correct. Normally I would ask for a binary testcase, but given that we
will probably want to change llvm-mc to produce them and lld to
optimized, LGTM for now.

Ok, thank you, I will commit that tomorrow then (If nothing changes).


ruiu accepted this revision.Mar 21 2016, 12:09 PM
ruiu edited edge metadata.


This revision is now accepted and ready to land.Mar 21 2016, 12:09 PM
This revision was automatically updated to reflect the committed changes.