From: Jan Janssen Date: Mon, 1 Nov 2021 09:36:12 +0000 (+0100) Subject: sd-boot: Add some link flags X-Git-Tag: v250-rc1~355^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f8a738bbc059071a7f218fd787ff6096fca90b82;p=thirdparty%2Fsystemd.git sd-boot: Add some link flags These flags are used by gnu-efi. Adding --no-undefined even allows us to drop the no-undefined-symbols.sh test in favor of immediate compile time errors. --- diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build index 5108cfa59eb..dd42e20fbd0 100644 --- a/src/boot/efi/meson.build +++ b/src/boot/efi/meson.build @@ -258,6 +258,9 @@ if have_gnu_efi '-shared', '-Bsymbolic', '-nostdlib', + '--no-undefined', + '--warn-common', + '--fatal-warnings', '-znocombreloc', '--build-id=sha1', '-L', efi_libdir, @@ -292,7 +295,6 @@ if have_gnu_efi systemd_boot_efi_name = 'systemd-boot@0@.efi'.format(EFI_MACHINE_TYPE_NAME) stub_elf_name = 'linux@0@.elf.stub'.format(EFI_MACHINE_TYPE_NAME) stub_efi_name = 'linux@0@.efi.stub'.format(EFI_MACHINE_TYPE_NAME) - no_undefined_symbols = find_program('no-undefined-symbols.sh') efi_stubs = [] foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects, false], @@ -326,12 +328,6 @@ if have_gnu_efi install_dir : bootlibdir) efi_stubs += [[so, stub]] - - if want_tests != 'false' - test('no-undefined-symbols-' + tuple[0], - no_undefined_symbols, - args : so) - endif endforeach ############################################################ diff --git a/src/boot/efi/no-undefined-symbols.sh b/src/boot/efi/no-undefined-symbols.sh deleted file mode 100755 index 8bdb16accf2..00000000000 --- a/src/boot/efi/no-undefined-symbols.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: LGPL-2.1-or-later -set -eu -set -o pipefail - -if nm -D -u "${1:?}" | grep ' U '; then - echo "Undefined symbols detected!" - exit 1 -fi