I've been experimenting and noticed that while this works and results in ELF section when applied to a static:
#[used]
#[unsafe(link_section = "TEST")]
This does not, corresponding section is simply missing in the binary:
#[used]
#[unsafe(link_section = ".TEST")]
It is possible to add with inline assembly, but not like ^ directly.
I have not been able to find any Rust issues about this or anything on the forum or elsewhere that would explain this behavior, there was also no warnings or anything like that generated by the compiler.
Does anyone know why this is happening?
3 posts - 2 participants