rust/compiler/rustc_target/src
Nikita Popov c7091f5a07 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.
2021-02-26 11:02:51 +01:00
..
abi Auto merge of #81346 - hug-dev:nonsecure-call-abi, r=jonas-schievink 2021-02-03 06:00:43 +00:00
asm New pass to deduplicate blocks 2021-02-21 21:51:54 +01:00
spec Link crtbegin/crtend on musl to terminate .eh_frame 2021-02-26 11:02:51 +01:00
lib.rs Dogfood 'str_split_once() with compiler/ 2020-12-07 12:48:44 -07:00