-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ORC][ORC-RT][ELF] Move selection of eh-frame registration APIs into …
…orc-rt. ORC's ELF platform support prefers the newer libunwind registration functions (__unw_add_dynamic_eh_frame_section, __unw_remove_dynamic_eh_frame_section) when they're available, and falls back to the older registration functions (__register_frame, __deregister_frame) when they're not. Until now the choice of registration functions has been made on the controller side in ELFNixPlatform: The platform JITDylib was searched for the registration functions and aliases set depending on which ones were found. This patch drops that selection logic from ELFNixPlatform and instead uses weak imports of the registration functions in elfnix_platform.cpp to identify which ones are available and choose which ones to use. This has a few small benefits: (1) The registration functions don't need to be defined in the same JITDylib as the ORC runtime -- it's sufficient for them to be defined in a JITDylib that the ORC runtime's JITDylib links against. (2) THe elfnix_platfrom code is more readable, as we don't have to dig into ELFNixPlatform.cpp on the controller side to discover the definition of the registration aliases. (3) We may save a separate round-trip to look up the registration APIs (the lookup will be folded into the ordinary external symbol lookup when linking the runtime).
- Loading branch information
Showing
2 changed files
with
27 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters