When efibootmgr is run and passed an invalid kernel, it segfaults when built with the default -O2 optimizations. For example: efibootmgr -c -L "FreeBSD" -l /mnt/efi/freebsd/LOADER.EFI -k /boot/kernel/kernel Segmentation fault If rebuilt with -O0, it produces the expected error message that it can't translate the kernel path to a UEFI path.