Hi Raymond,

Try not to post the same patches without the fixes that were asked
[0], at least not without an explanation.

On Thu, 9 May 2024 at 17:38, Raymond Mao <raymond....@linaro.org> wrote:
>
> Add text section alignment to fix sbsign signing warning
> 'gaps in the section table may result in different checksums'
> which causes a failure of efi_image_verify_diges()
>
> Signed-off-by: Raymond Mao <raymond....@linaro.org>
> ---
>  arch/arm/lib/elf_aarch64_efi.lds | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm/lib/elf_aarch64_efi.lds 
> b/arch/arm/lib/elf_aarch64_efi.lds
> index 5dd98091698..bffd9a0447a 100644
> --- a/arch/arm/lib/elf_aarch64_efi.lds
> +++ b/arch/arm/lib/elf_aarch64_efi.lds
> @@ -28,6 +28,7 @@ SECTIONS
>                 *(.dynamic);
>                 . = ALIGN(512);
>         }
> +       . = ALIGN(4096);

This is not what you want. There's already an ALIGN a few lines below
and you must include the symbols for _etext and _text_size.
You have to move the rela.* sections after the alignment. IIRC those
were inspired by [1], so you can look for guidance there.
On top of that riscv will need similar fixes (and any other
architecture that uses those)


>         .rela.dyn : { *(.rela.dyn) }
>         .rela.plt : { *(.rela.plt) }
>         .rela.got : { *(.rela.got) }
> --
> 2.25.1
>

[0] 
https://lore.kernel.org/u-boot/cac_iwjk+14l6mei8gqn-mcf-schvhnjj79ne1twlv+kgwzk...@mail.gmail.com/
[1] https://git.code.sf.net/p/gnu-efi/code

/Ilias

Reply via email to