[PATCH] armv8: Skip PIE in SPL due to load alignment fault.

Tom Rini trini at konsulko.com
Fri Aug 18 19:49:37 CEST 2023


On Thu, Aug 03, 2023 at 04:12:18PM +0800, Kevin Chen wrote:

> When PIE is enabled in start.S, u-boot/-spl use __rel_dyn_start
> and _rel_dyn_end symbol to be loaded to and executed at a
> different address than it was linked at.
> 
> u-boot-spl.lds is used in SPL build, but relocation information
> section(.rela*) were discarded.
> In line number 80 in arch/arm/cpu/armv8/u-boot-spl.lds
>  /DISCARD/ : { *(.rela*) }
> 
> If PIE enabled in SPL, __rel_dyn_start which is defined as
> .rel_dyn_start in sections.c will be apended to the end of
> .bss section.
> 
> In our ASPEED case, size of .bss section would let .rel_dyn_start
> without 8-byte alignment, leading to alignment fault when
> executing ldp instuction in pie_fix_loop.
> 
> Signed-off-by: Kevin Chen <kevin_chen at aspeedtech.com>

Applied to u-boot/next, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230818/75eea53e/attachment.sig>


More information about the U-Boot mailing list