Skip to content

Rename symbols rather than add symbol aliases for EIIs when possible - #159843

Draft
bjorn3 wants to merge 6 commits into
rust-lang:mainfrom
bjorn3:eii_using_symbol_rename
Draft

Rename symbols rather than add symbol aliases for EIIs when possible#159843
bjorn3 wants to merge 6 commits into
rust-lang:mainfrom
bjorn3:eii_using_symbol_rename

Conversation

@bjorn3

@bjorn3 bjorn3 commented Jul 24, 2026

Copy link
Copy Markdown
Member

The symbol name of the EII impl will now get changed to match the EII decl whenever there is no default impl. This already works across all backends and targets unlike the weak symbol aliases that we currently use. When there is a default impl, we will still use weak symbol aliases.

Based on #159374

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 24, 2026
@bjorn3 bjorn3 mentioned this pull request Jul 24, 2026
3 tasks
@rust-log-analyzer

This comment has been minimized.

@rust-bors

This comment has been minimized.

bjorn3 added 4 commits August 4, 2026 14:45
This reduces the amount of special casing #[no_mangle] needs in the rest
of the compiler.
#[link_ordinal] is not compatible with #[link_name] and items in extern
blocks now have an implicit #[link_name] with the item name.
Alternatively it would be possible to suppress the error message for
this implicit #[link_name].
@bjorn3
bjorn3 force-pushed the eii_using_symbol_rename branch from 0ad7e4b to 580bf28 Compare August 4, 2026 12:54
bjorn3 added 2 commits August 4, 2026 15:38
The symbol name of the EII impl will now get changed to match the EII
decl whenever there is no default impl. This already works across all
backends and targets unlike the weak symbol aliases that we currently
use. When there is a default impl, we will still use weak symbol
aliases.
@bjorn3
bjorn3 force-pushed the eii_using_symbol_rename branch from 580bf28 to 3b34082 Compare August 4, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants