about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage/debug.rs
diff options
context:
space:
mode:
authorJoshua M. Clulow <jmc@oxide.computer>2021-05-06 17:01:50 -0700
committerJoshua M. Clulow <jmc@oxide.computer>2021-05-06 17:08:10 -0700
commit31c2ad0d4cdd06622353a57b3a678586077b84fe (patch)
tree49d6d58a796c83a9801bc32165bf3bdf2d64105b /compiler/rustc_mir/src/transform/coverage/debug.rs
parent676ee14729462585b969bbc52f32c307403f4126 (diff)
downloadrust-31c2ad0d4cdd06622353a57b3a678586077b84fe.tar.gz
rust-31c2ad0d4cdd06622353a57b3a678586077b84fe.zip
illumos should put libc last in library search order
Under some conditions, the toolchain will produce a sequence of linker
arguments that result in a NEEDED list that puts libc before libgcc_s;
e.g.,

    [0]  NEEDED            0x2046ba            libc.so.1
    [1]  NEEDED            0x204723            libm.so.2
    [2]  NEEDED            0x204736            libsocket.so.1
    [3]  NEEDED            0x20478b            libumem.so.1
    [4]  NEEDED            0x204763            libgcc_s.so.1

Both libc and libgcc_s provide an unwinder implementation, but libgcc_s
provides some extra symbols upon which Rust directly depends.  If libc
is first in the NEEDED list we will find some of those symbols in libc
but others in libgcc_s, resulting in undefined behaviour as the two
implementations do not use compatible interior data structures.

This solution is not perfect, but is the simplest way to produce correct
binaries on illumos for now.
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions