[PATCH] D21215: [docs] Update AMDGPU relocation information

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 11 05:57:46 PDT 2016


On Jun 11, 2016 1:42 AM, "Tye, Tony" <Tony.Tye at amd.com> wrote:
>
> The old R_AMDGPU_ABS32_LO and the new R_AMDGPU_ABS32 are in fact the same
thing. The & 0xffffffff is implicitly done because the result of the
R_AMDGPU_ABS32 is a word32 not a word64. So putting in the & 0xffffffff is
redundant. The other ABI documents (such as for the x86) do not put in the
& 0xffffffff so it seemed best to follow their conventions.
R_AMDGPU_ABS32_HI and R_AMDGPU_ABS32 both return 32 bits as they are both
defined as word32. They differ in that R_AMDGPU_ABS32_HI takes the address
and shifts it right by 32 bits which effectively means that the top 32 bits
of the 64 bit address are returned, not the bottom 32 bits.

It is not the same thing. For example r_x86_64_32 *assumes* the value is 32
bits and the linker errors if it is not.

The x86_64 abi has no need for a low or high relocation.

Since you need a high, it is extremely likely you need a low.

Cheers,
Rafael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160611/ebf162ae/attachment.html>


More information about the llvm-commits mailing list