about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage/debug.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-05-07 16:19:18 +0200
committerGitHub <noreply@github.com>2021-05-07 16:19:18 +0200
commitcd37b950584cb320dc7a9a7bb59e8da5f91eb3c8 (patch)
treecbba68222460064a75818218f1df8dc2ec875591 /compiler/rustc_mir/src/transform/coverage/debug.rs
parente5f83d24aee866a14753a7cedbb4e301dfe5bef5 (diff)
parent31c2ad0d4cdd06622353a57b3a678586077b84fe (diff)
downloadrust-cd37b950584cb320dc7a9a7bb59e8da5f91eb3c8.tar.gz
rust-cd37b950584cb320dc7a9a7bb59e8da5f91eb3c8.zip
Rollup merge of #84254 - jclulow:illumos-link-order, r=petrochenkov
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