Skip to content

Split ELF and Wasm Swift runtime registration files#89930

Merged
etcwilde merged 1 commit into
swiftlang:mainfrom
etcwilde:ewilde/split-elf-wasm-registration
Jun 15, 2026
Merged

Split ELF and Wasm Swift runtime registration files#89930
etcwilde merged 1 commit into
swiftlang:mainfrom
etcwilde:ewilde/split-elf-wasm-registration

Conversation

@etcwilde

@etcwilde etcwilde commented Jun 13, 2026

Copy link
Copy Markdown
Member

Section headers aren't available in loaded ELF files. We will be adding some additional tables to ELF binaries containing a table of the metadata sections.

Wasm does make the section headers available and doesn't really seem to change the layout of an image when loading, so we don't need to include the new metadata section linker set table in Wasm binaries.

In the interest of keeping them small, and keeping the code cleaner, splitting it now to make it easier to target each object format directly.

@etcwilde

Copy link
Copy Markdown
Member Author

@swift-ci please test

@etcwilde

Copy link
Copy Markdown
Member Author

This was initially part of #87285, but that now has merge conflicts due changes in the combined ELF/WASM registration file and the split in that PR.

@compnerd compnerd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please make the adjustments to the Runtimes build as well.

@MaxDesiatov MaxDesiatov changed the title Split ELF and WASM runtime registration files Split ELF and Wasm Swift runtime registration files Jun 13, 2026
@etcwilde

Copy link
Copy Markdown
Member Author

Please make the adjustments to the Runtimes build as well.

Doh! You would think I would have remembered that.

Section headers aren't available in loaded ELF files. We will be adding
some additional tables to ELF binaries containing a table of the
metadata sections.

WASM does make the seciton headers available and doesn't really seem to
change the layout of an image when loading, so we don't need to include
the new metadata section linker set table in WASM binaries.

In the interest of keeping them small, and keeping the code cleaner,
splitting it now make it easier to target each object format directly.
@etcwilde etcwilde force-pushed the ewilde/split-elf-wasm-registration branch from 19ef906 to f8f4d0e Compare June 14, 2026 23:04
@etcwilde

Copy link
Copy Markdown
Member Author

@swift-ci please test

@etcwilde etcwilde requested a review from compnerd June 14, 2026 23:04
@etcwilde etcwilde merged commit b7176a1 into swiftlang:main Jun 15, 2026
6 checks passed
@etcwilde etcwilde deleted the ewilde/split-elf-wasm-registration branch June 15, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants