From cc6885fb95e4ac65d05f5e06b3dc405a07ad0804 Mon Sep 17 00:00:00 2001 From: Konstantin Zhuravlyov Date: Mon, 13 Mar 2017 06:03:11 +0000 Subject: [PATCH] AMDGPU/RelocVisitor: Handle R_AMDGPU_ABS64 Test is in the separate patch. Differential Revision: https://reviews.llvm.org/D30027 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297604 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Object/RelocVisitor.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/llvm/Object/RelocVisitor.h b/include/llvm/Object/RelocVisitor.h index 3510d293d73..3a0a62d9283 100644 --- a/include/llvm/Object/RelocVisitor.h +++ b/include/llvm/Object/RelocVisitor.h @@ -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(Value), /*Width=*/4); -- 2.50.1