This patch implements R_AARCH64_PREL64 and R_AARCH64_PREL32 relocations that is used in eh frame pointers. The test case utlizes obj2yaml tool to create an artifical eh frame that generates related relocation types.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/ExecutionEngine/JITLink/AArch64/ELF_aarch64_ehframe.test | ||
---|---|---|
3 | Trailing whitespace | |
62 | Where do the offsets come from and what is text - eh_frame - <offset> supposed to be pointing at? I am getting these sections in the object: .text 0000 e0031f2a c0035fd6 .eh_frame 0000 10000000 00000000 017a5200 017c1e01 0010 1b0c1f00 10000000 18000000 00000000 0020 08000000 00000000 ^^^^^^^^ eh_frame + 28 ^^^^^^^^^^^^^^^^^ eh_frame + 32 |
llvm/test/ExecutionEngine/JITLink/AArch64/ELF_aarch64_ehframe.test | ||
---|---|---|
62 | It's the delta from eh_frame + 28 to text + 0. eh_frame + 28 is the bytes that's going to be patched and it should point to text + 0. I can probably make it more clear by rewriting it to jitlink-check: *{4}(eh_frame + 28) = (text + 0) - (eh_frame + 28) |
llvm/test/ExecutionEngine/JITLink/AArch64/ELF_aarch64_ehframe.test | ||
---|---|---|
3 | 👀 |
LGTM. Thanks @sunho!
llvm/test/ExecutionEngine/JITLink/AArch64/ELF_aarch64_ehframe.test | ||
---|---|---|
2–4 | For single-file tests that don't need to name the object file in a jitlink-check expression, we usually omit the separate subdirectory: # RUN: yaml2obj -o %t.o %s # RUN: llvm-jitlink -noexec -check %s %t.o I'll make this simplification here when I land the patch. |
Trailing whitespace