summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/boot/efi/log.c6
-rw-r--r--src/boot/efi/meson.build1
2 files changed, 6 insertions, 1 deletions
diff --git a/src/boot/efi/log.c b/src/boot/efi/log.c
index 6ba8d2d58e..879ed766e3 100644
--- a/src/boot/efi/log.c
+++ b/src/boot/efi/log.c
@@ -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. */
diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
index bfc3f9c279..58bebe446e 100644
--- a/src/boot/efi/meson.build
+++ b/src/boot/efi/meson.build
@@ -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',
)