[PATCH] D138372: Updates and adds tests for i386/ELF JITLink backend

Kshitij Jain via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 20 09:49:24 PST 2022


jain98 added inline comments.


================
Comment at: llvm/test/ExecutionEngine/JITLink/i386/ELF_i386_pc_relative_relocations_32.s:39
+# RUN: llvm-jitlink -noexec %t.o
+# Tests PC relative relocation for negative offset from PC
+
----------------
sunho wrote:
> The test is noexec but it's without "jitlink-check"? 
> 
> I think what you would want to do is create another function that only contains  `calll   bar` and use jitlink-check to actually check if it's patched with valid value. You can see some examples in file `ELF_x86-64_small_pic_relocations.s` Specifically, look at test_call_local.

Thanks @sunho! I have changed the test accordingly.


================
Comment at: llvm/test/ExecutionEngine/JITLink/i386/ELF_i386_pc_relative_relocations_32.s:39
+# RUN: llvm-jitlink -noexec %t.o
+# Tests PC relative relocation for negative offset from PC
+
----------------
jain98 wrote:
> sunho wrote:
> > The test is noexec but it's without "jitlink-check"? 
> > 
> > I think what you would want to do is create another function that only contains  `calll   bar` and use jitlink-check to actually check if it's patched with valid value. You can see some examples in file `ELF_x86-64_small_pic_relocations.s` Specifically, look at test_call_local.
> 
> Thanks @sunho! I have changed the test accordingly.
Are similar checks not necessary for the absolute relocations?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138372



More information about the llvm-commits mailing list