boot: Add support for -ftrapv

This commit is contained in:
Jan Janssen 2023-03-10 09:21:08 +01:00
parent 48e1b2c250
commit f64f82aa8d
2 changed files with 6 additions and 1 deletions

View file

@ -81,6 +81,12 @@ void __stack_chk_fail_local(void) {
__stack_chk_fail();
}
/* Called by libgcc for some fatal errors like integer overflow with -ftrapv. */
_used_ _noreturn_ void abort(void);
void abort(void) {
panic(u"systemd-boot: Unknown error, halting.");
}
#if defined(__ARM_EABI__)
/* These override the (weak) div0 handlers from libgcc as they would otherwise call raise() instead. */

View file

@ -179,7 +179,6 @@ efi_disabled_c_args = cc.get_supported_arguments(
'-fcf-protection=none',
'-fno-asynchronous-unwind-tables',
'-fno-exceptions',
'-fno-trapv',
'-fno-sanitize=all',
'-fno-unwind-tables',
)