There come times when rust symbols are referenced only by external assembler. It seems rustc is eager to remove them (especially with -C lto, even making them public does not help).
In clang and gcc there are ways to prevent it, correspondingly: __attribute__((used)) and llvm.used`
If there's a way to get the same behavior in Rust? If not, can be added?
There come times when rust symbols are referenced only by external assembler. It seems rustc is eager to remove them (especially with
-C lto, even making them public does not help).In clang and gcc there are ways to prevent it, correspondingly:
__attribute__((used))andllvm.used`If there's a way to get the same behavior in Rust? If not, can be added?