From 59833064742310bfccf028b0278811ba5cff8dcf Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Thu, 9 Feb 2023 21:03:14 +0100 Subject: [PATCH] boot: Fix undefined reference to raise() on arm This is just a workaround. Once we drop gnu-efi, the arm build system for EFI binaries should be changed to use the arm-none-eabi toolchain, which should not exhibit this behavior. --- src/boot/efi/util.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/boot/efi/util.c b/src/boot/efi/util.c index 403b78c033..0133919706 100644 --- a/src/boot/efi/util.c +++ b/src/boot/efi/util.c @@ -721,3 +721,9 @@ void *find_configuration_table(const EFI_GUID *guid) { return NULL; } + +/* libgcc's __aeabi_ldiv0 intrinsic will call raise() on division by zero, so we + * need to provide one ourselves for now. */ +_noreturn_ int raise(int sig) { + assert_not_reached(); +}