This implements R_AARCH64_ADR_PREL_PG_HI21 and R_AARCH64_ADD_ABS_LO12_NC fixup edges using the generic aarch64 patch edges.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Have to mention the test case is taken from https://reviews.llvm.org/D118346 by @dongAxis1944
Thanks for your patch. The tests look good and appear to work fine on my machine. Will have a closer look at it towards the end of the week.
llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp | ||
---|---|---|
62 | The using namespace on file level makes the explicit qualifications here redundant right? It's a detail, but let's agree on one option and stick to it consistently. (More cases below.) | |
llvm/test/ExecutionEngine/JITLink/AArch64/ELF_aarch64_relocations.s | ||
50 | The value of p2align varies between test cases. How does it affect the resolution? (Trying other values like 1 or 2 doesn't fail the test.) |
Update the code
llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp | ||
---|---|---|
62 | In other backends, using namespace seems to be more common. I changed the code to consistently do without namespace. | |
llvm/test/ExecutionEngine/JITLink/AArch64/ELF_aarch64_relocations.s | ||
50 | It didn't affect the test result since we don't execute the code (-noexec), but in arm64, function entries need to be aligned to 4 bytes. Although techincally not required, I just added p2align 2 to function entry for the sake of cleaness. The reason for p2align 4 in named_data is since it might be used to test 128bit/64bit data load/store. |
LGTM, thanks for working on this!
llvm/test/ExecutionEngine/JITLink/AArch64/ELF_aarch64_relocations.s | ||
---|---|---|
50 | Alright, thanks for the explanation.
Yes, I realized that it makes a difference once I found it's used for the LDST relocations from D126630 as well. |
The using namespace on file level makes the explicit qualifications here redundant right? It's a detail, but let's agree on one option and stick to it consistently. (More cases below.)