[PATCH] aspeed/ast2600: Fix SPL linker script

Joel Stanley joel at jms.id.au
Tue Jun 28 06:27:25 CEST 2022


The commit 99e2fbcb69f0 ("linker_lists: Rename sections to remove .
prefix") changed the name of the linker list sections. As the Aspeed SPL
linker wasn't in the tree yet, it missed the change.

This updates the SPL linker to match arch/arm/cpu/u-boot-spl.lds which
Aspeed was copied from.

Fixes: 442a69c14375 ("configs: ast2600: Move SPL bss section to DRAM space")
Signed-off-by: Joel Stanley <joel at jms.id.au>
---

Note that the Aspeed script is still missing the following sections,
which would be a problem if --orphan-handling=warn or similar was added
to LDFLAGS in the future (or if some used data ended up in one of these
sections):

   .dynsym _image_binary_end : { *(.dynsym) }
   .dynbss : { *(.dynbss) }
   .dynstr : { *(.dynstr*) }
   .dynamic : { *(.dynamic*) }
   .hash : { *(.hash*) }
   .plt : { *(.plt*) }
   .interp : { *(.interp*) }
   .gnu : { *(.gnu*) }
   .ARM.exidx : { *(.ARM.exidx*) }

I assume we're safe because they're relating to dynamic objects, so we
don't generate any.

The following sections are not accounted for in both the aspeed linker script and
the generic arm one:

 orphan section `.vfp11_veneer' from `linker stubs' being placed in section `.vfp11_veneer'
 orphan section `.v4_bx' from `linker stubs' being placed in section `.v4_bx'
 orphan section `.iplt' from `arch/arm/cpu/armv7/start.o' being placed in section `.iplt'
 orphan section `.igot.plt' from `arch/arm/cpu/armv7/start.o' being placed in section `.igot.plt'

I assume they're not required as u-boot works without them.

 arch/arm/mach-aspeed/ast2600/u-boot-spl.lds | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-aspeed/ast2600/u-boot-spl.lds b/arch/arm/mach-aspeed/ast2600/u-boot-spl.lds
index 22b4e16d35c5..95a509ba3f31 100644
--- a/arch/arm/mach-aspeed/ast2600/u-boot-spl.lds
+++ b/arch/arm/mach-aspeed/ast2600/u-boot-spl.lds
@@ -40,8 +40,8 @@ SECTIONS
 	} > .nor
 
 	. = ALIGN(4);
-	.u_boot_list : {
-		KEEP(*(SORT(.u_boot_list*)));
+	__u_boot_list : {
+		KEEP(*(SORT(__u_boot_list*)));
 	} > .nor
 
 	. = ALIGN(4);
@@ -68,7 +68,7 @@ SECTIONS
 
 	_image_binary_end = .;
 
-	.bss : {
+	.bss __rel_dyn_start (OVERLAY) : {
 		__bss_start = .;
 		*(.bss*)
 		 . = ALIGN(4);
-- 
2.35.1



More information about the U-Boot mailing list