[PATCH] D21482: Support/ELF: Add R_AMDGPU_GOTPCREL relocation

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 06:04:49 PDT 2016


> We only support generating shared libraries of GPU code.  The shared libraries are loaded into memory, and then the CPU host code is essentially calling functions in the GPU libraries (not directly calling them directly, but using a GPU runtime library, like OpenCL, for example, to invoke the functions).
>
> We don't support preemption, but we need to use a got for referencing external variables.

Sorry, I am still missing something.

By "external", you mean "not in the .o" or "not in the .so". You don't
need a got to access things that are in the .so if you don't support
preemption. If they are external to the .so, where are they? Is it
possible to structure a gpu program as multiple .so files?


Cheers,
Rafael


More information about the llvm-commits mailing list