Message ID | 20240507175132.1456512-5-raymond.mao@linaro.org |
---|---|
State | RFC |
Delegated to: | Tom Rini |
Headers | show |
Series | Integrate MbedTLS v3.6 LTS with U-Boot | expand |
Hi Raymond, On Tue, 7 May 2024 at 20:53, Raymond Mao <raymond.mao@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.mao@linaro.org> > --- > Changes in v2 > - None. > > 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); There are linker symbols a few lines below marking _etext and _text_size. Those should be moved within the section alignment. On top of that, more architectures will need a similar fix. Heinrich don't you need similar changes on risc-v? Thanks /Ilias > .rela.dyn : { *(.rela.dyn) } > .rela.plt : { *(.rela.plt) } > .rela.got : { *(.rela.got) } > -- > 2.25.1 > Split this off to a preparation series. This seems like a generic fix.
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); .rela.dyn : { *(.rela.dyn) } .rela.plt : { *(.rela.plt) } .rela.got : { *(.rela.got) }
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.mao@linaro.org> --- Changes in v2 - None. arch/arm/lib/elf_aarch64_efi.lds | 1 + 1 file changed, 1 insertion(+)