Skip to content

Conversation

@jkoritzinsky
Copy link
Member

@jkoritzinsky jkoritzinsky commented Oct 29, 2025

Adds support in crossgen2 for emitting Mach-O objects.

Does not yet do the runtime support as that depends on #120777

@jkoritzinsky
Copy link
Member Author

/azp run runtime-ioslike

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkoritzinsky
Copy link
Member Author

/azp run runtime-ioslike

@azure-pipelines
Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@jkoritzinsky
Copy link
Member Author

/azp run runtime-ioslike

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkoritzinsky
Copy link
Member Author

/azp run runtime-ioslike

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkoritzinsky
Copy link
Member Author

/azp run runtime-ioslike

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@elinor-fung
Copy link
Member

I pulled this down to check out the generated System.Private.CoreLib.dylib built on a mac - targeted osx and ios. dyld_info works fine, otool shows the sections I'd expect, nm -u doesn't show any undefined (for ios, it does show dyld_stub_binder, which I think is fine/expected). For the osx one, I checked I could dlopen it successfully.

Copy link
Member

@elinor-fung elinor-fung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the comment about the linker warnings, looks good to me.

Copy link
Member

@elinor-fung elinor-fung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally for macos (osx, not mobile) with the runtime/host changes. With the fix for the flipped *_RELOC_SUBTRACTOR/*_RELOC_UNSIGNED index, I can successfully run a runtime test using the Mach-O R2R SPCL and a Mach-O R2R image for the test assembly itself.

elinor-fung added a commit that referenced this pull request Nov 11, 2025
…composite R2R images (#121363)

Add the basic runtime flow for calling into the host to get information
about a platform-native R2R - see docs/design/coreclr/botr/readytorun-platform-native-envelope.md#runtime-consuming-a-platform-native-r2r-image.
- Add `get_native_code_data` callback to `host_runtime_contract`
- If a component R2R assembly has
`READYTORUN_FLAG_PLATFORM_NATIVE_IMAGE`, invoke the callback to get the
R2R header, image size, and image base address
- Currently only implemented and tested on Windows (with local changes
to include the flag)
- Mach-O support will need #121186

Contributes to #120065.
@elinor-fung
Copy link
Member

/azp run runtime-ioslike

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants