diff options
author | Jan Janssen <medhefgo@web.de> | 2023-03-10 09:21:08 +0100 |
---|---|---|
committer | Jan Janssen <medhefgo@web.de> | 2023-03-17 10:35:29 +0100 |
commit | f64f82aa8d5181bb024767292aa8bcabdc7c019c (patch) | |
tree | aa34e5c40b32628426973d5a17037b542d15a8dd /src/boot/efi | |
parent | boot: Add support for -fstack-protector (diff) | |
download | systemd-f64f82aa8d5181bb024767292aa8bcabdc7c019c.tar.xz systemd-f64f82aa8d5181bb024767292aa8bcabdc7c019c.zip |
boot: Add support for -ftrapv
Diffstat (limited to 'src/boot/efi')
-rw-r--r-- | src/boot/efi/log.c | 6 | ||||
-rw-r--r-- | src/boot/efi/meson.build | 1 |
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', ) |