This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 217
Conversation
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
…ET Core host. Functions that use runtime data structures are stubbed out.
…and what work needs to be done for those.
…lidation, just enough to ensure that the assembly is a .NET assembly.
…rchitecture, so we don't need to branch on architecture.
…JW delegates from hostfxr.
…evant for the exe hosts.
…try-point from _CorDllMain.
…ectly handle an empty TPA when appending S.P.CL. Pass app-path to delegate.
jkotas
reviewed
Feb 16, 2019
jkotas
reviewed
Feb 16, 2019
cc @elinor-fung |
vitek-karas
approved these changes
Mar 9, 2019
vitek-karas
suggested changes
Mar 9, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to figure out the error handling (Specifically writing errors to stderr).
jkotas
reviewed
Mar 12, 2019
jkotas
reviewed
Mar 12, 2019
jkotas
reviewed
Mar 12, 2019
jkotas
reviewed
Mar 12, 2019
vitek-karas
approved these changes
Mar 13, 2019
…clr_delegate" entrypoint.
picenka21
pushed a commit
to picenka21/runtime
that referenced
this pull request
Feb 18, 2022
* First pass porting mscoree/mscoreei's IJW hosting hooks into a new .NET Core host. Functions that use runtime data structures are stubbed out. * Use Windows heap functions for allocating executable memory. * Add IJW activation design document. * Add talking point about loading dependencies from *.deps.json* files and what work needs to be done for those. * Clean up design doc. * Update design doc. * Feedback. * Clean up the PEDecoder since we don't need to port over all of the validation, just enough to ensure that the assembly is a .NET assembly. * The OS will verify that the IJW image and the IJW host are the same architecture, so we don't need to branch on architecture. * Clean up ijwhost and PEDecoder code based on review feedback. * Refactor corehost.cpp and add implementations of functions to fetch IJW delegates from hostfxr. * Move hostfxr resolution into separate file and make corehost only relevant for the exe hosts. * Make get_latest_fxr local to fxr_resolver.cpp * Implement fxr wire-up for ijwhost. * Rvas are already mapped for loaded images. * Don't use stubs if being loaded into currently running runtime. * Update IJW activation doc based on updated info about callbacks. * Implement token resolution from thunks. Fix calling a users native entry-point from _CorDllMain. * Correctly resolve side-by-side hostfxr from ijwhost and comhost. Correctly handle an empty TPA when appending S.P.CL. Pass app-path to delegate. * Update design doc. * Remove unneeded validation. * Fix assembler selection for ARM/ARM64. * Fix indentation. * Remove dead code in PEDecoder. * Fix missing CommandLineToArgvW symbol in arm/arm64 builds. * Fix ARM/ARM64 build by bringing over custom arm assembler supporting cmake from coreclr. * Remove IJWBootstrapThunk opaque class. Rename all non-exported apis to match the snake_case convention in this repo. * Remove exports.cpp files per pr feedback. * Use an enum to specify which delegate to load from the runtime in the hostfxr<->hostpolicy API. * Fix x86 build * Make x86 implementation of get_thunk_from_cookie clearer. * Symbol export changes needed for x86 as found by testing. * Remove ijw-exe-specific path. * clean up ijwhost.cpp since we only have one entrypoint into hostfxr from ijwhost now. * Use enum for delegate getter in hostfxr-exposed api as well. * PR Feedback. * Add ijwhost to Microsoft.NetCore.DotNetAppHost package. * Setup tracing on comhost and ijwhost entry points. * PR Feedback. * Remove IsILOnly checks. * Clean up design doc. * More cleanup on IJW activation design doc * swallow tracing on IJW. Remove as much of corhdr.h as possible. * Fix bad copy-paste in the install command in ijwhost cmake script. * Fix cmake * Add error message to trace for failure to find the "corehost_get_coreclr_delegate" entrypoint. * Sign ijwhost. Fixes dotnet/core-setup#5485. Commit migrated from dotnet/core-setup@bc7bcc6
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.
Add a hosting shim for IJW assemblies on Windows.
When an IJW assembly is loaded, the shim will swap out the tokens in the vtfixup table with delayed-activation thunks that activate the runtime when called (to avoid the Windows Loader Lock). The shim also provides an entry-point to resolve these delayed-activation thunks back to tokens for the case where the IJW assembly is being loaded from managed code.
IJW executables will be built into DLLs (same as the rest of the .NET Core ecosystem), so we don't need any additional entrypoints.
cc: @jkotas @jeffschwMSFT @sdmaclea
See dotnet/coreclr#22636 for the runtime component.