about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-02-27 21:56:19 +0100
committerGitHub <noreply@github.com>2021-02-27 21:56:19 +0100
commita7f9aca0a61e16f7eeeea206fbaf0e655bd9de89 (patch)
tree3e3723c14ca44c92afb45dff36bb27198c74c39e /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent13ea3fab5fb4492b61b7b9d7e3ec55bb5a9d7149 (diff)
parentc7091f5a07fa665344d0ebafae5480f54337ef88 (diff)
downloadrust-a7f9aca0a61e16f7eeeea206fbaf0e655bd9de89.tar.gz
rust-a7f9aca0a61e16f7eeeea206fbaf0e655bd9de89.zip
Rollup merge of #82534 - nikic:musl-crtend, r=nagisa
Link crtbegin/crtend on musl to terminate .eh_frame

For some targets, rustc uses a "CRT fallback", where it links CRT
object files it ships instead of letting the host compiler link
them.

On musl, rustc currently links crt1, crti and crtn (provided by
libc), but does not link crtbegin and crtend (provided by libgcc).
In particular, crtend is responsible for terminating the .eh_frame
section. Lack of terminator may result in segfaults during
unwinding, as reported in #47551 and encountered by the LLVM 12
update in #81451.

This patch links crtbegin and crtend for musl as well, following
the table at the top of crt_objects.rs.

r? ``@nagisa``
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions