Skip to content

#[used(linker)] is broken on illumos #146169

@Noratrieb

Description

@Noratrieb

On illumos, #[used(linker)] generates the section flag 0x100000, which is known as SHF_SUNW_NODISCARD on Solaris, but unknown to illumos. This causes incorrect behavior when used in combination with .init_array, for example by inventory.

This regressed in #140872 which made #[used] mean #[used(linker)] on all ELF targets, including illumos.

See

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-illumosthe other shiny OST-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