From 0ff04b2ff2bc2c5ebe6bbb97aa89fb7ae8c318ac Mon Sep 17 00:00:00 2001 From: Gary Lin Date: Wed, 17 Mar 2021 15:44:38 +0800 Subject: arm and aarch64: include the aligned part in SizeOfRawData of sbat Similar to x86_64, the .sbat section is aligned to 4096, so we should include the aligned part in SizeOfRawData as objcopy does for x86_64. For VirtualSize, _sbat_vsize is used to reflect the actually size of sbat. This also fixes a strange hash mismatching in openSUSE build service when attaching signature to AArch64 EFI images from shim package. Signed-off-by: Gary Lin --- elf_aarch64_efi.lds | 2 ++ elf_arm_efi.lds | 2 ++ gnu-efi | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/elf_aarch64_efi.lds b/elf_aarch64_efi.lds index 70cc9588..feb4ead9 100644 --- a/elf_aarch64_efi.lds +++ b/elf_aarch64_efi.lds @@ -76,6 +76,8 @@ SECTIONS *(.sbat.*) } _esbat = .; + _sbat_vsize = . - _sbat; + . = ALIGN(4096); _sbat_size = . - _sbat; _alldata_size = . - _data; diff --git a/elf_arm_efi.lds b/elf_arm_efi.lds index fa7512be..d7de181f 100644 --- a/elf_arm_efi.lds +++ b/elf_arm_efi.lds @@ -74,6 +74,8 @@ SECTIONS *(.sbat.*) } _esbat = .; + _sbat_vsize = . - _sbat; + . = ALIGN(4096); _sbat_size = . - _sbat; _alldata_size = . - _data; diff --git a/gnu-efi b/gnu-efi index e32d8c84..5e07f70b 160000 --- a/gnu-efi +++ b/gnu-efi @@ -1 +1 @@ -Subproject commit e32d8c84a5748a2e3b7220dae638418f81a7986d +Subproject commit 5e07f70b08776e72fa1d081af56b8d5e636433c9 -- cgit v1.2.3