[PATCH] D127058: [JITLink][ELF/AARCH64] Implement R_AARCH64_PREL32 and R_AARCH64_PREL64

Sunho Kim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 7 10:37:52 PDT 2022


sunho added inline comments.


================
Comment at: llvm/test/ExecutionEngine/JITLink/AArch64/ELF_aarch64_ehframe.test:61
+# jitlink-check: *{4}(eh_frame + 28) = text - eh_frame - 28
+# jitlink-check: *{8}(eh_frame + 32) = text - eh_frame - 32
----------------
sgraenitz wrote:
> 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
> ```
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)
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127058/new/

https://reviews.llvm.org/D127058



More information about the llvm-commits mailing list