From 5c368899b30a6b2d2148e8f37e8181ba2b7c2b80 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sat, 22 Jun 2013 13:03:15 +0000 Subject: RelocVisitor: Add another PPC64 relocation that occurs in dwarf output. Should bring the ppc64 buildbot back to life. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184633 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Object/RelocVisitor.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/llvm/Object') diff --git a/include/llvm/Object/RelocVisitor.h b/include/llvm/Object/RelocVisitor.h index 52e4d6f..b1eb4e6 100644 --- a/include/llvm/Object/RelocVisitor.h +++ b/include/llvm/Object/RelocVisitor.h @@ -81,6 +81,8 @@ public: switch (RelocType) { case llvm::ELF::R_PPC64_ADDR32: return visitELF_PPC64_ADDR32(R, Value); + case llvm::ELF::R_PPC64_ADDR64: + return visitELF_PPC64_ADDR64(R, Value); default: HasError = true; return RelocToApply(); @@ -217,6 +219,10 @@ private: uint32_t Res = (Value + Addend) & 0xFFFFFFFF; return RelocToApply(Res, 4); } + RelocToApply visitELF_PPC64_ADDR64(RelocationRef R, uint64_t Value) { + int64_t Addend = getAddend64BE(R); + return RelocToApply(Value + Addend, 8); + } /// PPC32 ELF RelocToApply visitELF_PPC_ADDR32(RelocationRef R, uint64_t Value) { -- cgit v1.1