mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
############################################################
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user