[PATCH] D157803: [JITLink][RISCV] Implement eh_frame handling
Job Noorman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 18 00:29:19 PDT 2023
jobnoorman added a comment.
Herald added a subscriber: sunshaoce.
It seems I created a PR <https://github.com/llvm/llvm-project/pull/66067> implementing essentially the same thing :) Since both patches are equivalent, I don't mind which one gets merged.
My PR has one extra test case that checks if the values for `CIE_pointer`, `address_range`, and `DW_CFA_advance_loc` are patched correctly. It might be worth adding that test case to this patch.
================
Comment at: llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp:462
break;
+ case Delta32: {
+ int64_t Value = E.getTarget().getAddress() - FixupAddress + E.getAddend();
----------------
This is the same as `R_RISCV_32_PCREL` so maybe just reuse that one? At some point, `R_RISCV_32_PCREL` should be renamed to `Delta32` though.
================
Comment at: llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp:473
+ case NegDelta32: {
+ int64_t Value = FixupAddress - E.getTarget().getAddress() + E.getAddend();
+ *(little32_t *)FixupPtr = static_cast<uint32_t>(Value);
----------------
Add range check?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157803/new/
https://reviews.llvm.org/D157803
More information about the llvm-commits
mailing list