Use protected visibility by default on ELF platforms · Issue #105518 · rust-lang/rust (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@pcc

Description

@pcc

I noticed that the .so files built by x.py contain a lot of "unnecessary" PLT entries. The compiler should be using protected visibility on ELF platforms by default.

I was thinking we should be able to tie it to #[no_mangle] but on Zulip @bjorn3 proposed tying it to the SymbolExportLevel (Rust for mangled and unmangled but not exported from cdylib #[rustc_std_internal_symbol] symbols and C for #[no_mangle] symbols).