[PATCH] D20736: [AMDGPU] Implement AMDGPU relocations in lld
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Mon May 30 14:34:04 PDT 2016
tstellarAMD added inline comments.
================
Comment at: ELF/Target.cpp:1259-1269
@@ -1262,2 +1258,13 @@
uint64_t Val) const {
- llvm_unreachable("not implemented");
+ switch (Type) {
+ case R_AMDGPU_32_LOW:
+ write32le(Loc, Val);
+ break;
+ case R_AMDGPU_32_HIGH:
+ write32le(Loc, (Val >> 32) & 0xFFFFFFFF);
+ break;
+ case R_AMDGPU_64:
+ write64le(Loc, Val);
+ break;
+ default:
+ fatal("unrecognized reloc " + Twine(Type));
----------------
Does this function actually get called for absolute relocations? I thought it was only called when the relocated value could be computed by the linker.
http://reviews.llvm.org/D20736
More information about the llvm-commits
mailing list