[llvm] r297604 - AMDGPU/RelocVisitor: Handle R_AMDGPU_ABS64
Konstantin Zhuravlyov via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 12 23:03:12 PDT 2017
Author: kzhuravl
Date: Mon Mar 13 01:03:11 2017
New Revision: 297604
URL: http://llvm.org/viewvc/llvm-project?rev=297604&view=rev
Log:
AMDGPU/RelocVisitor: Handle R_AMDGPU_ABS64
Test is in the separate patch.
Differential Revision: https://reviews.llvm.org/D30027
Modified:
llvm/trunk/include/llvm/Object/RelocVisitor.h
Modified: llvm/trunk/include/llvm/Object/RelocVisitor.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/RelocVisitor.h?rev=297604&r1=297603&r2=297604&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/RelocVisitor.h (original)
+++ llvm/trunk/include/llvm/Object/RelocVisitor.h Mon Mar 13 01:03:11 2017
@@ -155,6 +155,8 @@ private:
switch (RelocType) {
case llvm::ELF::R_AMDGPU_ABS32:
return visitELF_AMDGPU_ABS32(R, Value);
+ case llvm::ELF::R_AMDGPU_ABS64:
+ return visitELF_AMDGPU_ABS64(R, Value);
default:
HasError = true;
return RelocToApply();
@@ -450,6 +452,11 @@ private:
return RelocToApply(Value + Addend, 4);
}
+ RelocToApply visitELF_AMDGPU_ABS64(RelocationRef R, uint64_t Value) {
+ int64_t Addend = getELFAddend(R);
+ return RelocToApply(Value + Addend, 8);
+ }
+
/// I386 COFF
RelocToApply visitCOFF_I386_SECREL(RelocationRef R, uint64_t Value) {
return RelocToApply(static_cast<uint32_t>(Value), /*Width=*/4);
More information about the llvm-commits
mailing list