[PATCH] D147693: [JITLink][RISCV] ADD/SUB relocs: read value from working memory

Job Noorman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 7 00:45:43 PDT 2023


jobnoorman updated this revision to Diff 511631.
jobnoorman edited the summary of this revision.
jobnoorman added a comment.
Herald added a subscriber: MaskRay.

> You can test this by adding `-slab-allocate=1Mb -slab-address=0x1000 -slab-page-size=0x1000` to the `RUN: llvm-jitlink` lines in the existing `llvm/test/ExecutionEngine/JITLink/RISCV/riscv_reloc_add.s` test. This will force the JIT'd code to be laid out as-if allocated at 0x1000, which will trigger the bug.

Nice, thanks for this @lhames!

Diff update:

- Modify tests to use different working/execution addresses.
- Fix forgotten SUB6 reloc.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147693

Files:
  llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
  llvm/test/ExecutionEngine/JITLink/RISCV/riscv_reloc_add.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147693.511631.patch
Type: text/x-patch
Size: 4903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230407/d235cc91/attachment.bin>


More information about the llvm-commits mailing list