Closed
Description
We should compile libbacktrace I... think with -fvisibility=hidden
, but I don't think that we are. This causes the symbols to be exported when they shouldn't be:
$ echo '#[no_mangle] pub extern fn foo() { panic!() }' > foo.rs
$ echo 'extern void foo(); int main() { foo(); return 0; }' > foo.c
$ rustc foo.rs --crate-type staticlib -C lto
$ gcc foo.c libfoo.a
$ nm -g ./a.out | grep backtrace_
0000000000512a7b T backtrace_alloc
000000000051131b T backtrace_close
0000000000511365 T backtrace_create_state
00000000005181c4 T backtrace_dwarf_add
0000000000512c5c T backtrace_free
00000000005128dd T backtrace_get_view
0000000000512772 T backtrace_initialize
0000000000511277 T backtrace_open
0000000000511192 T backtrace_pcinfo
0000000000518320 T backtrace_qsort
00000000005129d7 T backtrace_release_view
0000000000511202 T backtrace_syminfo
0000000000512eb7 T backtrace_vector_finish
0000000000512d12 T backtrace_vector_grow
0000000000512f01 T backtrace_vector_release
cc https://bugzilla.mozilla.org/show_bug.cgi?id=1288173
cc @froydnj