Skip to content

Use protected visibility by default on ELF platforms #105518

Open
@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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linkageArea: linking into static, shared libraries and binariesT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions