-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-illumosthe other shiny OSthe other shiny OST-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
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
- Original investigation by @MarceColl on this issue: https://system-illumination.org/01-rustler.html
- discussed on lobste.rs: https://lobste.rs/s/nr8kkd/debugging_rustler_on_illumos
- Attempt to work-around in the
inventory
crate: Fix illumos .init_array section creation dtolnay/inventory#84
- LLVM change to start using
SHF_SUNW_NODISCARD
on Solaris: https://reviews.llvm.org/D107955#:~:text=One,them - LLVM change related to retained section behavior: https://reviews.llvm.org/D97448
chamitachama
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-illumosthe other shiny OSthe other shiny OST-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.