[PATCH 6/7 v2] arm: move image_copy_start/end to linker symbols

Richard Henderson richard.henderson at linaro.org
Tue Mar 12 17:08:44 CET 2024


On 3/12/24 04:08, Ilias Apalodimas wrote:
> image_copy_start/end are defined as c variables in order to force the compiler
> emit relative references. However, defining those within a section definition
> will do the same thing since [0].
> 
> So let's remove the special sections from the linker scripts, the
> variable definitions from sections.c and define them as a symbols within
> a section.
> 
> [0] binutils commit 6b3b0ab89663 ("Make linker assigned symbol dynamic only for shared object")
> 
> Suggested-by: Sam Edwards<CFSworks at gmail.com>
> Signed-off-by: Ilias Apalodimas<ilias.apalodimas at linaro.org>
> Tested-by: Sam Edwards<CFSworks at gmail.com>  # Binary output identical
> ---
>   arch/arm/cpu/armv8/u-boot-spl.lds           | 7 ++-----
>   arch/arm/cpu/armv8/u-boot.lds               | 9 ++-------
>   arch/arm/cpu/u-boot-spl.lds                 | 2 +-
>   arch/arm/cpu/u-boot.lds                     | 9 ++-------
>   arch/arm/lib/sections.c                     | 2 --
>   arch/arm/mach-aspeed/ast2600/u-boot-spl.lds | 2 +-
>   arch/arm/mach-rockchip/u-boot-tpl-v8.lds    | 7 ++-----
>   arch/arm/mach-zynq/u-boot-spl.lds           | 2 +-
>   arch/arm/mach-zynq/u-boot.lds               | 8 ++------
>   9 files changed, 13 insertions(+), 35 deletions(-)

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

r~


More information about the U-Boot mailing list