I'm creating a cdylib that is intendend to be LD_PRELOADed. As such, I want strong control over exported symbols: every extra symbol has the potential to break something.
Rust provides its own version script to the linker, which includes rust_eh_personality
as a public symbol. I can:
- Set panics to abort, apparently, but I am considering handling them so I can making my library minimize damage.
- Add a version script of my own, which I'm doing—but at least with LLD, that doesn't override the previous one, it's just additive, and
rustc
already adds a version script of its own with things it thinks should be public. Which means I can add more public symbols, but I can't makerust_eh_personality
private via version script.
Is there a way I can either tell rustc to not set a version script of its own (it looks like it's somehow tied to compilation platform, rather config options?), or otherwise have more control over symbol visibility?