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

Lang Hames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 09:51:58 PDT 2023


lhames added a comment.

In D157802#4588857 <https://reviews.llvm.org/D157802#4588857>, @Hahnfeld wrote:

> In D157802#4585948 <https://reviews.llvm.org/D157802#4585948>, @lhames wrote:
>
>>>> 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.
>>>
>>> Ah ok, thanks for that explanation. So `EHFrameEdgeFixer` is maybe not needed at all on ELF? Or maybe we can split the part that is specific to MachO into a separate pass that explicitly does what is needed instead of `getOrCreateEncodedPointerEdge`?
>>
>> Yeah -- that sounds good to me. Could you see what happens if you just remove it altogether? Hopefully that just works. Otherwise we can look at refactoring options.
>
> No, it doesn't work - we need it to add an edge of type `NegDelta32` to the CIE. The other two relocations are indeed not needed. So we refactor that part out into a separate pass?

Yeah -- I think that's a reasonable solution. `AddFDEToCIEEdges`?


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