[llvm] [JITLink][AArch64] Implement R_AARCH64_LDR_PREL_LO19 (PR #82172)

Pavel Samolysov via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 29 20:44:27 PST 2024


================
@@ -51,6 +51,21 @@ test_adr_prel_lo21:
 ## to test this bit better
 adr_data = test_adr_prel_lo21 + 0xe46f2
 
+# Check R_AARCH64_LD_PREL_LO19 relocation of a local symbol
----------------
samolisov wrote:

@eymay Thank you very much for the review and idea to simplify the test. My idea was to show how addends in the relocation will be handled by the linker, this is important because the previous implementation just asserted the addend to zero what is not always true, I saw really generated code where the `R_AARCH64_LD_PREL_LO19` relocation had a non-zero addend. But I overengineering the code with nops to give the loaded symbol a place to be, your version is much simpler and also works.

https://github.com/llvm/llvm-project/pull/82172


More information about the llvm-commits mailing list