diff --git a/llvm/tools/llvm-objdump/MachODump.cpp b/llvm/tools/llvm-objdump/MachODump.cpp --- a/llvm/tools/llvm-objdump/MachODump.cpp +++ b/llvm/tools/llvm-objdump/MachODump.cpp @@ -451,9 +451,11 @@ StringRef S; bool isExtern = O->getPlainRelocationExternal(RE); + bool isArm64 = + O->getArch() == Triple::aarch64 || O->getArch() == Triple::aarch64_be; uint64_t Val = O->getPlainRelocationSymbolNum(RE); - if (O->getAnyRelocationType(RE) == MachO::ARM64_RELOC_ADDEND) { + if (isArm64 && O->getAnyRelocationType(RE) == MachO::ARM64_RELOC_ADDEND) { Fmt << format("0x%0" PRIx64, Val); return; }