[PATCH] D30027: AMDGPU/RelocVisitor: Handle R_AMDGPU_ABS64 + add dwarfdump test

Konstantin Zhuravlyov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 12 23:15:28 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL297604: AMDGPU/RelocVisitor: Handle R_AMDGPU_ABS64 (authored by kzhuravl).

Changed prior to commit:
  https://reviews.llvm.org/D30027?vs=88686&id=91514#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D30027

Files:
  llvm/trunk/include/llvm/Object/RelocVisitor.h


Index: llvm/trunk/include/llvm/Object/RelocVisitor.h
===================================================================
--- llvm/trunk/include/llvm/Object/RelocVisitor.h
+++ llvm/trunk/include/llvm/Object/RelocVisitor.h
@@ -155,6 +155,8 @@
         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 @@
     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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30027.91514.patch
Type: text/x-patch
Size: 931 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170313/a73bce56/attachment.bin>


More information about the llvm-commits mailing list