sh: Assure end of U-Boot is at 8-byte aligned offset
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Wed, 19 Nov 2025 17:44:36 +0000 (18:44 +0100)
committerMarek Vasut <marek.vasut+renesas@mailbox.org>
Tue, 2 Dec 2025 23:15:40 +0000 (00:15 +0100)
Make sure the end of U-Boot is at 8-byte aligned offset, not 4-byte
aligned offset. This allows safely appending DT at the end of U-Boot
with the guarantee that the DT will be at 8-byte aligned offset. This
8-byte alignment is now checked by newer libfdt 1.7.2 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
arch/sh/cpu/u-boot.lds

index c31deec..81526f5 100644 (file)
@@ -72,6 +72,7 @@ SECTIONS
 
        __u_boot_list : {
                KEEP(*(SORT(__u_boot_list*)));
+               . = ALIGN(8);
        } >ram
 
        PROVIDE (__init_end = .);
@@ -83,7 +84,7 @@ SECTIONS
        .bss :
        {
                *(.bss)
-               . = ALIGN(4);
+               . = ALIGN(8);
        } >ram
        PROVIDE (bss_end = .);
        PROVIDE (__bss_end = .);