You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
alexcrichton opened this issue
Jul 23, 2016
· 6 comments
Labels
A-linkageArea: linking into static, shared libraries and binariesE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
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]pubexternfnfoo(){panic!()}' > foo.rs
$ echo 'extern void foo(); int main(){ foo();return0;}' > foo.c
$ rustc foo.rs --crate-typestaticlib -C lto
$ gcc foo.c libfoo.a
$ nm -g ./a.out | grep backtrace_
0000000000512a7b T backtrace_alloc
000000000051131b T backtrace_close
0000000000511365T backtrace_create_state
00000000005181c4 T backtrace_dwarf_add
0000000000512c5c T backtrace_free
00000000005128dd T backtrace_get_view
0000000000512772T backtrace_initialize
0000000000511277T backtrace_open
0000000000511192T backtrace_pcinfo
0000000000518320T backtrace_qsort
00000000005129d7 T backtrace_release_view
0000000000511202T backtrace_syminfo
0000000000512eb7 T backtrace_vector_finish
0000000000512d12 T backtrace_vector_grow
0000000000512f01 T backtrace_vector_release
This should be a relatively easy bug to tackle if anyone's interested, but I'm not convinced of the solution so I'm not gonna tag E-easy just yet. If you've got a Linux machine though it'd be great to play around on!
A-linkageArea: linking into static, shared libraries and binariesE-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
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:cc https://bugzilla.mozilla.org/show_bug.cgi?id=1288173
cc @froydnj
The text was updated successfully, but these errors were encountered: