[PATCH v3 7/7] arm: remove redundant section alignments

Richard Henderson richard.henderson at linaro.org
Wed Mar 13 21:21:51 CET 2024


On 3/13/24 06:23, Ilias Apalodimas wrote:
> Previous patches cleaning up linker symbols, also merged any explicit
> . = ALIGN(x); into section definitions -- e.g
> .bss ALIGN(x) : instead of
> 
> . = ALIGN(x);
> . bss : {...}
> 
> However, if the output address is not specified then one will be chosen
> for the section. This address will be adjusted to fit the alignment
> requirement of the output section following the strictest alignment of
> any input section contained within the output section. So let's get rid
> of the redundant ALIGN directives when they are not needed.
> 
> While at add comments for the alignment of __bss_start/end since our
> C runtime setup assembly assumes that __bss_start - __bss_end will be
> a multiple of 4/8 for armv7 and armv8 respectively.
> 
> It's worth noting that the alignment is preserved on .rel.dyn for
> mach-zynq which was explicitly aligning that section on an 8b
> boundary instead of 4b one.
> 
> Signed-off-by: Ilias Apalodimas<ilias.apalodimas at linaro.org>
> ---
>   arch/arm/cpu/armv8/u-boot.lds | 9 ++++++---
>   arch/arm/cpu/u-boot.lds       | 8 ++++++--
>   arch/arm/mach-zynq/u-boot.lds | 4 ++--
>   3 files changed, 14 insertions(+), 7 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson at linaro.org>

r~


More information about the U-Boot mailing list