This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Add RELATIVE64 relocation record.
ClosedPublic

Authored by t-tye on Oct 13 2017, 4:31 PM.

Details

Summary

Add base relative relocation record that can be used for the following case (OpenCL example):

static __global int Var = 0; 
__global int* Ptr[] = {&Var};
...

In this case Var is a non premptable symbol and so its address can be used as the value of Ptr, with a base relative relocation that will add the delta between the ELF address and the actual load address. Such relocations do not require a symbol.

Diff Detail

Event Timeline

t-tye created this revision.Oct 13 2017, 4:31 PM
kzhuravl accepted this revision.Oct 13 2017, 5:34 PM

LGTM.

This revision is now accepted and ready to land.Oct 13 2017, 5:34 PM
This revision was automatically updated to reflect the committed changes.