This is an archive of the discontinued LLVM Phabricator instance.

ELF: Add support for relocation type R_X86_64_8.
ClosedPublic

Authored by pcc on Jan 17 2017, 5:57 PM.

Details

Summary

Although this relocation type is not part of the x86-64 psABI, I intend to
use it internally as part of the ThinLTO implementation.

Event Timeline

pcc created this revision.Jan 17 2017, 5:57 PM
davide added a subscriber: davide.Jan 17 2017, 5:58 PM

This is obviously correct, but can you please explain how do you plan to use it in ThinLTO? Thanks.

pcc added a comment.Jan 17 2017, 6:13 PM

This is needed for the ThinLTO implementation of control flow integrity, see http://lists.llvm.org/pipermail/llvm-dev/2016-October/106490.html for more details.

The R_X86_64_8 relocation type in particular is needed for 8-bit immediate operands, such as the rorl instruction's rotate count operand.

This revision was automatically updated to reflect the committed changes.
In D28841#649125, @pcc wrote:

This is needed for the ThinLTO implementation of control flow integrity, see http://lists.llvm.org/pipermail/llvm-dev/2016-October/106490.html for more details.

The R_X86_64_8 relocation type in particular is needed for 8-bit immediate operands, such as the rorl instruction's rotate count operand.

LGTM.