[PATCH] D89094: [objdump][macho] Check arch before formating reloc name as arm64 addend
Daniel Sanders via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 16 14:31:10 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG109113015ebe: [objdump][macho] Check arch before formating reloc name as arm64 addend (authored by pguo, committed by dsanders).
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
@@ -453,7 +453,8 @@
bool isExtern = O->getPlainRelocationExternal(RE);
uint64_t Val = O->getPlainRelocationSymbolNum(RE);
- if (O->getAnyRelocationType(RE) == MachO::ARM64_RELOC_ADDEND) {
+ if (O->getAnyRelocationType(RE) == MachO::ARM64_RELOC_ADDEND &&
+ (O->getArch() == Triple::aarch64 || O->getArch() == Triple::aarch64_be)) {
Fmt << format("0x%0" PRIx64, Val);
return;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89094.298760.patch
Type: text/x-patch
Size: 601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201016/703016c5/attachment.bin>
More information about the llvm-commits
mailing list