[PATCH] D89094: [objdump][macho] Check arch before formating reloc name as arm64 addend
Peng Guo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 8 21:53:00 PDT 2020
pguo updated this revision to Diff 297122.
pguo added a comment.
Fix commit message.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89094/new/
https://reviews.llvm.org/D89094
Files:
llvm/tools/llvm-objdump/MachODump.cpp
Index: llvm/tools/llvm-objdump/MachODump.cpp
===================================================================
--- llvm/tools/llvm-objdump/MachODump.cpp
+++ 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;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89094.297122.patch
Type: text/x-patch
Size: 645 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201009/2fe26e8d/attachment.bin>
More information about the llvm-commits
mailing list