[PATCH] D140203: [lld][ARM][3/3]Big Endian support - Adding tests
Peter Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 16 07:47:59 PST 2022
peter.smith added a comment.
The title implies that this is just adding tests. Can you update the title to include something like Complete Arm BE32 big-endian support and add tests; or move the SyntheticSections change back to Patch [2/3]
I'll be on holiday for the next 3 weeks. Happy for someone else to review in my absence.
================
Comment at: lld/ELF/SyntheticSections.cpp:3543
// A Linker generated CANTUNWIND section.
- memcpy(buf + offset, cantUnwindData, sizeof(cantUnwindData));
+ write64(buf + offset, read64(cantUnwindData));
uint64_t s = isec->getVA();
----------------
I think this should be two `write32`s as the table is made up of two 32-bit values
| PREL31 to function | CANT_UNWIND |
================
Comment at: lld/ELF/SyntheticSections.cpp:3551
// Write Sentinel.
- memcpy(buf + offset, cantUnwindData, sizeof(cantUnwindData));
+ write64(buf + offset, read64(cantUnwindData));
uint64_t s = sentinel->getVA(sentinel->getSize());
----------------
Same here
================
Comment at: lld/test/ELF/arm-exidx-emit-relocs.s:81
+// CHECK-EB-NEXT: 100e4 00010030 00000001 0001002c 00000001
+// CHECK-EB-NEXT: 100f4 00010028 80978408 00010024 01000000
----------------
The last line is showing the write64 problem with the CANTUNWIND entry. It should be `00000001`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140203/new/
https://reviews.llvm.org/D140203
More information about the llvm-commits
mailing list