HomePhabricator

[X86] Avoid generating invalid R_X86_64_GOTPCRELX relocations

Authored by hvdijk on Dec 18 2020, 3:38 PM.

Description

[X86] Avoid generating invalid R_X86_64_GOTPCRELX relocations

We need to make sure not to emit R_X86_64_GOTPCRELX relocations for
instructions that use a REX prefix. If a REX prefix is present, we need to
instead use a R_X86_64_REX_GOTPCRELX relocation. The existing logic for
CALL64m, JMP64m, etc. already handles this by checking the HasREX parameter
and using it to determine which relocation type to use. Do this for all
instructions that can use relaxed relocations.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D93561

Details

Committed
hvdijkDec 18 2020, 3:38 PM
Reviewer
MaskRay
Differential Revision
D93561: [X86] Avoid generating invalid R_X86_64_GOTPCRELX relocations
Parents
rGf5cef870d116: [www] Remove '$Date$' marker from cxx_dr_status.
Branches
Unknown
Tags
Unknown