[PATCH] D157519: [JITLink][AArch32] Tests for ELF::R_ARM_ABS32 and ELF::R_ARM_REL32
Stefan Gränitz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 9 11:56:50 PDT 2023
sgraenitz added a comment.
This is looking very good already! Nice idea to check ARM and Thumb in one test. I am not sure, however, if it's worth the effort. They both produce `R_ARM_ABS32` and `R_ARM_REL32`. The only difference is the alignment and here Thumb alone would be sufficient:
➜ llvm-objdump -r ...
RELOCATION RECORDS FOR [.text]: RELOCATION RECORDS FOR [.text]:
OFFSET TYPE VALUE OFFSET TYPE VALUE
00000004 R_ARM_ABS32 target 00000002 R_ARM_ABS32 target
00000008 R_ARM_REL32 target 00000006 R_ARM_REL32 target
^ ARM is on a 4-byte boundary ^ Thumb is 2-byte
What we should do at some point (not necessarily in this patch) is to check whether it works on big-endian targets. Add a `eb` suffix to the arch in order to test it, e.g. `thumbebv7-none-linux-gnueabihf`
================
Comment at: llvm/test/ExecutionEngine/JITLink/AArch32/ELF_static_data_reloc.s:16
+// CHECK-THM: "abs32": 0x{{[0-9a-f]+[02468ace]}} [Data] Ready
+// CHECK-THM: "main": 0x{{[0-9a-f]+[13579bdf]}} [Callable] Ready
+// CHECK-THM: "rel32": 0x{{[0-9a-f]+[02468ace]}} [Data] Ready
----------------
Yes, but it's no data-relocation, so it should be out-of-scope for this test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157519/new/
https://reviews.llvm.org/D157519
More information about the llvm-commits
mailing list