[PATCH] D139097: [ARM] Fix Address value difference for symbol emitted by llvm-nm
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 1 04:43:20 PST 2022
jhenderson added a reviewer: psmith.
jhenderson added a comment.
It is my understanding that the final bit in ARM code is to indicate whether it is from the THUMB or ARM instruction set for an address and that actual address calculations ignore the final bit of the address value. Under what circumstances would you therefore ever have a function at an odd address? Could it be that GNU nm is actually incorrect here to not remove the odd bit?
(Please note, I am not an ARM developer and therefore don't know much about this area).
================
Comment at: llvm/include/llvm/Object/ELFObjectFile.h:561
const Elf_Ehdr &Header = EF.getHeader();
// Clear the ARM/Thumb or microMIPS indicator flag.
+ if ((Header.e_machine == ELF::EM_MIPS) &&
----------------
With this change, the comment becomes incorrect.
================
Comment at: llvm/test/tools/llvm-nm/ARM/address-check.test:1-3
+## Test for function type symbols with odd valued address
+## to reflect correct value on ARM
+#
----------------
Various nits. Also, please reflow the comment to 80 character width.
================
Comment at: llvm/test/tools/llvm-nm/ARM/address-check.test:27
+# CHECK: 00001003 T foo
\ No newline at end of file
----------------
Nit: add new line at EOF.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139097/new/
https://reviews.llvm.org/D139097
More information about the llvm-commits
mailing list