From 97b767eb3ba0ea9bb4a1c8ea95cc14289ab087f2 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 30 Jul 2022 10:46:58 -0700 Subject: [PATCH] [ELF] Support missing relocations in PPC64::getImplicitAddend() --- lld/ELF/Arch/PPC64.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lld/ELF/Arch/PPC64.cpp b/lld/ELF/Arch/PPC64.cpp index 9b72029e8e1d..f90e89cb8d67 100644 --- a/lld/ELF/Arch/PPC64.cpp +++ b/lld/ELF/Arch/PPC64.cpp @@ -1064,11 +1064,18 @@ RelType PPC64::getDynRel(RelType type) const { int64_t PPC64::getImplicitAddend(const uint8_t *buf, RelType type) const { switch (type) { case R_PPC64_NONE: + case R_PPC64_GLOB_DAT: + case R_PPC64_JMP_SLOT: return 0; case R_PPC64_REL32: return SignExtend64<32>(read32(buf)); case R_PPC64_ADDR64: case R_PPC64_REL64: + case R_PPC64_RELATIVE: + case R_PPC64_IRELATIVE: + case R_PPC64_DTPMOD64: + case R_PPC64_DTPREL64: + case R_PPC64_TPREL64: return read64(buf); default: internalLinkerError(getErrorLocation(buf),