Put data segment in specified section with link_section on wasm - #161862
Merged
rust-bors[bot] merged 2 commits intoAug 28, 2026
Merged
Conversation
Member
Author
|
cc @sutajo |
This is the normal behavior on other targets, but previously on wasm the data segment would be in the default section and instead a custom section with the given name would be added to the wasm module.
bjorn3
force-pushed
the
wasm_link_section_segment_custom_section
branch
from
August 27, 2026 10:57
b90d24a to
281be7d
Compare
Member
|
@bors r+ |
Contributor
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Aug 27, 2026
…ustom_section, r=alexcrichton Put data segment in specified section with link_section on wasm This is the normal behavior on other targets, but previously on wasm the data segment would be in the default section and instead a custom section with the given name would be added to the wasm module. Fixes rust-lang#146538 r? alexcrichton
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Aug 27, 2026
…ustom_section, r=alexcrichton Put data segment in specified section with link_section on wasm This is the normal behavior on other targets, but previously on wasm the data segment would be in the default section and instead a custom section with the given name would be added to the wasm module. Fixes rust-lang#146538 r? alexcrichton
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Aug 27, 2026
…ustom_section, r=alexcrichton Put data segment in specified section with link_section on wasm This is the normal behavior on other targets, but previously on wasm the data segment would be in the default section and instead a custom section with the given name would be added to the wasm module. Fixes rust-lang#146538 r? alexcrichton
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Aug 27, 2026
…ustom_section, r=alexcrichton Put data segment in specified section with link_section on wasm This is the normal behavior on other targets, but previously on wasm the data segment would be in the default section and instead a custom section with the given name would be added to the wasm module. Fixes rust-lang#146538 r? alexcrichton
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 28, 2026
Rollup of 14 pull requests Successful merges: - #150075 (Implement clamp_to) - #159103 (fix(reborrow): recursive implementation) - #160848 (std: avoid aliasing violations when wrapping opaque C types) - #161421 (Include startup crt objects on WASI for more outputs) - #161805 (Prefer ambiguous candidates when deduplicating traits in scope, so `ambiguous_glob_imported_traits` doesn't depend on import order) - #161862 (Put data segment in specified section with link_section on wasm) - #161866 (delegation: add tests fixating behavior of delegating to default trait implementations) - #161456 (reduce perf impact of scalar size checks) - #161666 (Print vendor instructions in `x vendor`) - #161730 (Improve type mismatch annotation for lets with block-wrapped initializers) - #161828 (Never type after-stabilization cleanup) - #161860 (atomicptr.rs test: remove unused import) - #161870 (bind to [::1] instead of 127.0.0.1 in documentation examples for v6 UDP methods) - #161876 (rustdoc: Correctly handle when a macro generates multiple items in `--generate-macro-expansion`)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Aug 28, 2026
…ustom_section, r=alexcrichton Put data segment in specified section with link_section on wasm This is the normal behavior on other targets, but previously on wasm the data segment would be in the default section and instead a custom section with the given name would be added to the wasm module. Fixes rust-lang#146538 r? alexcrichton
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Aug 28, 2026
…ustom_section, r=alexcrichton Put data segment in specified section with link_section on wasm This is the normal behavior on other targets, but previously on wasm the data segment would be in the default section and instead a custom section with the given name would be added to the wasm module. Fixes rust-lang#146538 r? alexcrichton
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 28, 2026
…uwer Rollup of 21 pull requests Successful merges: - #158609 (Update sccache to 0.16.0) - #150075 (Implement clamp_to) - #159103 (fix(reborrow): recursive implementation) - #160562 (add target feature ABI checks for SPARC) - #160848 (std: avoid aliasing violations when wrapping opaque C types) - #161421 (Include startup crt objects on WASI for more outputs) - #161805 (Prefer ambiguous candidates when deduplicating traits in scope, so `ambiguous_glob_imported_traits` doesn't depend on import order) - #161862 (Put data segment in specified section with link_section on wasm) - #161866 (delegation: add tests fixating behavior of delegating to default trait implementations) - #161456 (reduce perf impact of scalar size checks) - #161528 (Add regression test to ensure optimal compilation) - #161666 (Print vendor instructions in `x vendor`) - #161730 (Improve type mismatch annotation for lets with block-wrapped initializers) - #161828 (Never type after-stabilization cleanup) - #161859 (Do not optimize MIR for comptime ConstFns) - #161860 (atomicptr.rs test: remove unused import) - #161870 (bind to [::1] instead of 127.0.0.1 in documentation examples for v6 UDP methods) - #161876 (rustdoc: Correctly handle when a macro generates multiple items in `--generate-macro-expansion`) - #161889 (Add link to ownership section in ptr::read docs) - #161890 (rustdoc: some clarifying comments) - #161891 (Mark `extern_item_impls` feature as incomplete) Failed merges: - #161702 (Use `drop_guard` in some places in {core,alloc,std})
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 28, 2026
…uwer Rollup of 21 pull requests Successful merges: - #150075 (Implement clamp_to) - #159103 (fix(reborrow): recursive implementation) - #160562 (add target feature ABI checks for SPARC) - #160848 (std: avoid aliasing violations when wrapping opaque C types) - #161421 (Include startup crt objects on WASI for more outputs) - #161805 (Prefer ambiguous candidates when deduplicating traits in scope, so `ambiguous_glob_imported_traits` doesn't depend on import order) - #161862 (Put data segment in specified section with link_section on wasm) - #161866 (delegation: add tests fixating behavior of delegating to default trait implementations) - #157218 (Track items behind `cfg_select` in the same way we do for `cfg`) - #161456 (reduce perf impact of scalar size checks) - #161528 (Add regression test to ensure optimal compilation) - #161666 (Print vendor instructions in `x vendor`) - #161730 (Improve type mismatch annotation for lets with block-wrapped initializers) - #161828 (Never type after-stabilization cleanup) - #161859 (Do not optimize MIR for comptime ConstFns) - #161860 (atomicptr.rs test: remove unused import) - #161870 (bind to [::1] instead of 127.0.0.1 in documentation examples for v6 UDP methods) - #161876 (rustdoc: Correctly handle when a macro generates multiple items in `--generate-macro-expansion`) - #161889 (Add link to ownership section in ptr::read docs) - #161890 (rustdoc: some clarifying comments) - #161891 (Mark `extern_item_impls` feature as incomplete) Failed merges: - #161702 (Use `drop_guard` in some places in {core,alloc,std})
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 28, 2026
Rollup merge of #161862 - bjorn3:wasm_link_section_segment_custom_section, r=alexcrichton Put data segment in specified section with link_section on wasm This is the normal behavior on other targets, but previously on wasm the data segment would be in the default section and instead a custom section with the given name would be added to the wasm module. Fixes #146538 r? alexcrichton
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is the normal behavior on other targets, but previously on wasm the data segment would be in the default section and instead a custom section with the given name would be added to the wasm module.
Fixes #146538
r? alexcrichton