[PATCH] D157802: [JITLink][EHFrameSupport] Accept multiple relocations

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 13 22:24:21 PDT 2023


lhames added a comment.

> Multiple relocations at one offset are fine, for example RISC-V uses it in FDE's.

That's interesting. Are all relocations that share an offset identical? (same type, target, etc.) If not, are we really free to ignore the others?

I'm particularly interested because I've thought about enforcing such a uniqueness constraint at the `LinkGraph` level: no more than one edge at a given offset. I had assumed that this would be safe, but it sounds like this may not work for RISCV graphs.

As for `BlockEdges`, it's dealing with a quirk that I think only applies to MachO: On some architectures, notably x86-64, the `__eh_frame` section doesn't have explicit relocations for some fields. Instead, the target is implied by the initial values of the CIE / FDE fields and the linker has to recreate the edges from that. BlockEdges I used to track which fields (if any) have explicit edges already so that the others can be created.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157802



More information about the llvm-commits mailing list