summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYiFei Zhu <zhuyifei1999@gmail.com>2019-01-26 17:51:27 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-02-09 17:51:23 +0100
commit2f92b1e99a8343248fba2118793f754bac2b50c7 (patch)
tree0af68f624515026f8da5055f8a08ace0f07d828a /src
parentsemaphore: keep build settings in the repository (diff)
downloadsystemd-2f92b1e99a8343248fba2118793f754bac2b50c7.tar.xz
systemd-2f92b1e99a8343248fba2118793f754bac2b50c7.zip
boot/efi: use a wildcard section copy for final EFI generation
The GNU gold linker uses the section name `.rela.dyn` instead of `.rela` for containing the relocation information. If this section is not copied systemd-boot can crash. Efitools started using wildcard section copies in their commit b98d381b, and these wildcard sections are the only difference between systemd-boot's section copy list and theirs. This patch add the wildcard section `.rel*` to our objcopy, as it should include all other wildcards assuming a recent GNU objcopy. Redundant arguments for sections that would be matched by this wildcard are removed. This patch has been tested on EDK II UEFI v2.70 Firmware on QEMU, and Lenovo 0.5120 UEFI 2.40 Firmware on bare metal. Fixes: #11541
Diffstat (limited to 'src')
-rw-r--r--src/boot/efi/meson.build4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/boot/efi/meson.build b/src/boot/efi/meson.build
index 9c0ae5ace1..2140151844 100644
--- a/src/boot/efi/meson.build
+++ b/src/boot/efi/meson.build
@@ -194,9 +194,7 @@ if have_gnu_efi
'-j', '.data',
'-j', '.dynamic',
'-j', '.dynsym',
- '-j', '.rel',
- '-j', '.rela',
- '-j', '.reloc']
+ '-j', '.rel*']
+ efi_format +
['@INPUT@', '@OUTPUT@'],
install : true,