HomePhabricator

[AMDGPU] Fix offset for REL32_HI relocs

Authored by foad on Tue, Sep 1, 6:52 AM.

Description

[AMDGPU] Fix offset for REL32_HI relocs

The addend in a REL32 reloc needs to be adjusted to account for the
offset from the PC value returned by the s_getpc instruction to the
point where the reloc is applied. This was being done correctly for
(GOTPC)REL32_LO but not for (GOTPC)REL32_HI. This will only make a
difference if the target symbol happens to get loaded almost exactly
a multiple of 4G away from the relocated instructions.

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

Details

Committed
foadWed, Sep 2, 2:55 AM
Differential Revision
D86938: [AMDGPU] Fix offset for REL32_HI relocs
Parents
rGf13beac51be0: [AArch64][SVE] Preserve full vector regs over EH edge.
Branches
Unknown
Tags
Unknown