[mono][aot] Emit a list of exported methods into the AOT image and load them when the image is loaded.#82809
Merged
vargaz merged 1 commit intodotnet:mainfrom Mar 2, 2023
Merged
Conversation
a3a313d to
8e95582
Compare
8e95582 to
69f12a0
Compare
Member
This was referenced Mar 1, 2023
kotlarmilos
reviewed
Mar 2, 2023
…ad them when the image is loaded. If there is a runtime attach function specified, these methods can call into the runtime before its initialized. In order for this to work, the runtime attach function needs to load all the AOT images containing such methods, and load_aot_module () will load and initialize these methods using the newly emitted table.
69f12a0 to
a297498
Compare
Member
|
I will run this on the library builder scenario during the day and validate that it resolves the init issues. |
lateralusX
approved these changes
Mar 2, 2023
Member
lateralusX
left a comment
There was a problem hiding this comment.
LGTM! Ran it in both Full AOT and Full AOT + LLVM mode in a scenario where all is build into a native library, unmanagedcallersonly are exported out as entry points, library embedded in application that just call entry point, library init callback gets called that just loads the assembly and that now triggers the load of the methods marked with unmanagedcallersonly attribute, making sure all GOT and PLT slots have been initialized before continue executing the code in native-to-managed wrapper.
Contributor
Author
|
Failures are unrelated. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.