boot/efi: install ELF linux.elf.stub in addition to PE linux.efi.stub
Binutils for non-x86 architectures currently does not support PE binaries. Thus linux.efi.stub is useless on those, as one cannot use any tooling to add linux/cmdline/splash sections to it. In addition to PE linux.efi.stub also install ELF linux.elf.stub, such that one can use objcopy ELF target to copy in linux/cmdline/splash sections and then convert the result to a PE binary.
This commit is contained in:
@@ -254,18 +254,21 @@ if have_gnu_efi
|
||||
|
||||
libgcc_file_name = run_command(efi_cc + ['-print-libgcc-file-name']).stdout().strip()
|
||||
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')
|
||||
|
||||
foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects],
|
||||
['stub.so', stub_efi_name, stub_objects]]
|
||||
foreach tuple : [['systemd_boot.so', systemd_boot_efi_name, systemd_boot_objects, 'systemd_boot.so', false],
|
||||
['stub.so', stub_efi_name, stub_objects, stub_elf_name, true]]
|
||||
so = custom_target(
|
||||
tuple[0],
|
||||
input : tuple[2],
|
||||
output : tuple[0],
|
||||
output : tuple[3],
|
||||
command : [efi_ld, '-o', '@OUTPUT@'] +
|
||||
efi_ldflags + tuple[2] +
|
||||
['-lefi', '-lgnuefi', libgcc_file_name])
|
||||
['-lefi', '-lgnuefi', libgcc_file_name],
|
||||
install : tuple[4],
|
||||
install_dir : bootlibdir)
|
||||
|
||||
if want_tests != 'false'
|
||||
test('no-undefined-symbols-' + tuple[0],
|
||||
|
||||
Reference in New Issue
Block a user