[PATCH] D140202: [lld][ARM][2/3]Big Endian support - Word invariant support
Peter Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 15 03:11:49 PDT 2023
peter.smith added a comment.
I think I've spotted a problem in .ARM.exidx table compression. I also think we can get rid of config->be32 for this patch as nothing else reads it.
================
Comment at: lld/ELF/Config.h:202
bool asNeeded = false;
+ bool be32 = false;
BsymbolicKind bsymbolic = BsymbolicKind::None;
----------------
I don't think anything in this patch uses this be32 variable. Given that there will be a --be8 switch and be32 will be the default I think we can do everything we need in a follow up patch with just be8 which is set with `config->be8 = args.hasArg(OPT_be8);`
================
Comment at: lld/ELF/Driver.cpp:1555
config->endianness = config->isLE ? endianness::little : endianness::big;
+ config->be32 = (k == ELF32BEKind && m == EM_ARM);
config->isMips64EL = (k == ELF64LEKind && m == EM_MIPS);
----------------
As mentioned above I think we can take this out for this patch as config->be32 is never read.
================
Comment at: lld/ELF/SyntheticSections.cpp:3414
struct ExidxEntry {
ulittle32_t fn;
ulittle32_t unwind;
----------------
I think this needs changing, it is probably the reason the .ARM.exidx table is not identical between little and big-endian.
================
Comment at: lld/test/ELF/arm-exidx-emit-relocs.s:77
// CHECK-RELOCS-NOT: Relocation section '.rel.ARM.exidx'
+
+// CHECK-EB: Contents of section .ARM.exidx:
----------------
There is an extra table entry in the .ARM.exidx section, which I can't immediately see why that would be the case. The only difference I can see in the RUN: line is -mcpu=cortex-a8 but I wouldn't expect that to make any difference.
At a glance I can see two identical entries at addresses 100d4 and 100dc with unwinding instructions 80978408. Table compression should be able to merge these two adjacent, identical entries.
================
Comment at: lld/test/ELF/arm-exidx-sentinel-norelocatable.s:23
// CHECK: Size: 8
+
----------------
Remove extra trailing whitespace
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140202/new/
https://reviews.llvm.org/D140202
More information about the llvm-commits
mailing list