Closed
Description
I tried this:
$ echo | rustc - --crate-type cdylib
$ bingrep librust_out.so
[...]
Dyn Syms(13):
Addr Bind Type Symbol Size Section Other
[...]
1300 GLOBAL FUNC rust_eh_personality 0x2e5 .text(11) 0x0
[...]
I expected to see this happen: No symbols are exported as there are no #[no_mangle]
symbols in the crate source.
Instead, this happened: rust_eh_personality
is exported. This means that different rustc versions could potentially interfere with unwinding of code compiled by the other rustc version by overriding this symbol.
Meta
rustc --version --verbose
:
rustc 1.59.0-nightly (91a0600a5 2021-12-18)
binary: rustc
commit-hash: 91a0600a5c22b9d159e3c57526af83e71d1120f8
commit-date: 2021-12-18
host: x86_64-unknown-linux-gnu
release: 1.59.0-nightly
LLVM version: 13.0.0
and
rustc 1.56.0 (09c42c458 2021-10-18)
binary: rustc
commit-hash: 09c42c45858d5f3aedfa670698275303a3d19afa
commit-date: 2021-10-18
host: x86_64-unknown-linux-gnu
release: 1.56.0
LLVM version: 13.0.0