arm: make _end compiler-generated
authorAlbert ARIBAUD <albert.u.boot@aribaud.net>
Sat, 22 Feb 2014 16:53:42 +0000 (17:53 +0100)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Wed, 26 Feb 2014 20:18:09 +0000 (21:18 +0100)
This prevents references to _end from generating absolute
relocation records.

This change is binary invariant for ARM targets.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
22 files changed:
arch/arm/cpu/arm1136/u-boot-spl.lds
arch/arm/cpu/arm920t/ep93xx/u-boot.lds
arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds
arch/arm/cpu/arm926ejs/spear/u-boot-spl.lds
arch/arm/cpu/armv7/am33xx/u-boot-spl.lds
arch/arm/cpu/armv7/omap-common/u-boot-spl.lds
arch/arm/cpu/armv7/socfpga/u-boot-spl.lds
arch/arm/cpu/armv7/zynq/u-boot.lds
arch/arm/cpu/at91-common/u-boot-spl.lds
arch/arm/cpu/u-boot-spl.lds
arch/arm/cpu/u-boot.lds
arch/arm/lib/Makefile
arch/arm/lib/sections.c
board/Barix/ipam390/u-boot-spl-ipam390.lds
board/ait/cam_enc_4xx/u-boot-spl.lds
board/compulab/cm_t335/u-boot.lds
board/davinci/da8xxevm/u-boot-spl-da850evm.lds
board/davinci/da8xxevm/u-boot-spl-hawk.lds
board/freescale/mx31ads/u-boot.lds
board/samsung/common/exynos-uboot-spl.lds
board/ti/am335x/u-boot.lds
board/vpac270/u-boot-spl.lds

index bccde73..0299902 100644 (file)
@@ -33,7 +33,11 @@ SECTIONS
        .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
        . = ALIGN(4);
        __image_copy_end = .;
-       _end = .;
+
+       .end :
+       {
+               *(.__end)
+       }
 
        .bss :
        {
index 4bed4fc..9699404 100644 (file)
@@ -50,5 +50,8 @@ SECTIONS
        .bss : { *(.bss*) }
        __bss_end = .;
 
-       _end = .;
+       .end :
+       {
+               *(.__end)
+       }
 }
index 80fb9bd..d0b482d 100644 (file)
@@ -49,9 +49,14 @@ SECTIONS
                __bss_end = .;
        }
 
-       _end = .;
+       .end :
+       {
+               *(.__end)
+       }
+
+       _image_binary_end = .;
 
-       .dynsym _end : { *(.dynsym) }
+       .dynsym _image_binary_end : { *(.dynsym) }
        .dynbss : { *(.dynbss) }
        .dynstr : { *(.dynstr*) }
        .dynamic : { *(.dynamic*) }
index 76b499d..b6d0f65 100644 (file)
@@ -49,9 +49,14 @@ SECTIONS
                __bss_end = .;
        }
 
-       _end = .;
+       .end :
+       {
+               *(.__end)
+       }
+
+       _image_binary_end = .;
 
-       .dynsym _end : { *(.dynsym) }
+       .dynsym _image_binary_end : { *(.dynsym) }
        .dynbss : { *(.dynbss) }
        .dynstr : { *(.dynstr*) }
        .dynamic : { *(.dynamic*) }
index 9302856..b1c28c9 100644 (file)
@@ -38,7 +38,11 @@ SECTIONS
 
        . = ALIGN(4);
        __image_copy_end = .;
-       _end = .;
+
+       .end :
+       {
+               *(.__end)
+       } >.sram
 
        .bss :
        {
index 02aa129..745603d 100644 (file)
@@ -39,7 +39,11 @@ SECTIONS
 
        . = ALIGN(4);
        __image_copy_end = .;
-       _end = .;
+
+       .end :
+       {
+               *(.__end)
+       }
 
        .bss :
        {
index a7c9c9d..4282beb 100644 (file)
@@ -28,7 +28,11 @@ SECTIONS
 
        . = ALIGN(4);
        __image_copy_end = .;
-       _end = .;
+
+       .end :
+       {
+               *(.__end)
+       }
 
        .bss : {
                . = ALIGN(4);
index a68b050..f2a5965 100644 (file)
@@ -60,7 +60,12 @@ SECTIONS
                *(.__rel_dyn_end)
        }
 
-       _end = .;
+       .end :
+       {
+               *(.__end)
+       }
+
+       _image_binary_end = .;
 
 /*
  * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
index 038335d..57ac1eb 100644 (file)
@@ -37,7 +37,11 @@ SECTIONS
 
        . = ALIGN(4);
        __image_copy_end = .;
-       _end = .;
+
+       .end :
+       {
+               *(.__end)
+       } >.sram
 
        .bss :
        {
index 4880d0f..3e88668 100644 (file)
@@ -42,7 +42,12 @@ SECTIONS
                __rel_dyn_end = .;
        }
 
-       _end = .;
+       .end :
+       {
+               *(.__end)
+       }
+
+       _image_binary_end = .;
 
        .bss __rel_dyn_start (OVERLAY) : {
                __bss_start = .;
@@ -51,7 +56,7 @@ SECTIONS
                __bss_end = .;
        }
 
-       .dynsym _end : { *(.dynsym) }
+       .dynsym _image_binary_end : { *(.dynsym) }
        .dynbss : { *(.dynbss) }
        .dynstr : { *(.dynstr*) }
        .dynamic : { *(.dynamic*) }
index 4da5d24..87c2de2 100644 (file)
@@ -60,7 +60,12 @@ SECTIONS
                *(.__rel_dyn_end)
        }
 
-       _end = .;
+       .end :
+       {
+               *(.__end)
+       }
+
+       _image_binary_end = .;
 
        /*
         * Deprecated: this MMU section is used by pxa at present but
@@ -91,7 +96,7 @@ SECTIONS
                KEEP(*(.__bss_end));
        }
 
-       .dynsym _end : { *(.dynsym) }
+       .dynsym _image_binary_end : { *(.dynsym) }
        .dynbss : { *(.dynbss) }
        .dynstr : { *(.dynstr*) }
        .dynamic : { *(.dynamic*) }
index 321997c..45febcf 100644 (file)
@@ -32,7 +32,6 @@ endif
 ifndef CONFIG_SYS_GENERIC_BOARD
 obj-y  += board.o
 endif
-obj-y  += sections.o
 
 obj-$(CONFIG_OF_LIBFDT) += bootm-fdt.o
 obj-$(CONFIG_CMD_BOOTM) += bootm.o
@@ -43,6 +42,7 @@ else
 obj-$(CONFIG_SPL_FRAMEWORK) += spl.o
 endif
 
+obj-y  += sections.o
 ifdef CONFIG_ARM64
 obj-y  += interrupts_64.o
 else
index e35687c..5b30bcb 100644 (file)
@@ -25,3 +25,4 @@ char __image_copy_start[0] __attribute__((section(".__image_copy_start")));
 char __image_copy_end[0] __attribute__((section(".__image_copy_end")));
 char __rel_dyn_start[0] __attribute__((section(".__rel_dyn_start")));
 char __rel_dyn_end[0] __attribute__((section(".__rel_dyn_end")));
+char _end[0] __attribute__((section(".__end")));
index 5480d1f..8604696 100644 (file)
@@ -49,5 +49,9 @@ SECTIONS
        } >.sram
 
        __image_copy_end = .;
-       _end = .;
+
+       .end :
+       {
+               *(.__end)
+       } >.sram
 }
index fdfbfc3..c0d09ad 100644 (file)
@@ -48,5 +48,9 @@ SECTIONS
        } >.sram
 
        __image_copy_end = .;
-       _end = .;
+
+       .end :
+       {
+               *(.__end)
+       }
 }
index d25c19a..0984dfe 100644 (file)
@@ -61,7 +61,12 @@ SECTIONS
                *(.__rel_dyn_end)
        }
 
-       _end = .;
+       .end :
+       {
+               *(.__end)
+       }
+
+       _image_binary_end = .;
 
        /*
         * Deprecated: this MMU section is used by pxa at present but
@@ -92,7 +97,7 @@ SECTIONS
                KEEP(*(.__bss_end));
        }
 
-       .dynsym _end : { *(.dynsym) }
+       .dynsym _image_binary_end : { *(.dynsym) }
        .hash : { *(.hash) }
        .got.plt : { *(.got.plt) }
        .dynbss : { *(.dynbss) }
index 5480d1f..de21a13 100644 (file)
@@ -49,5 +49,9 @@ SECTIONS
        } >.sram
 
        __image_copy_end = .;
-       _end = .;
+
+       .end :
+       {
+               *(.__end)
+       }
 }
index d49c314..299226b 100644 (file)
@@ -61,5 +61,8 @@ SECTIONS
                __bss_end = .;
        }
 
-       _end = .;
+       .end :
+       {
+               *(.__end)
+       }
 }
index 1cca176..6da1d4b 100644 (file)
@@ -69,7 +69,12 @@ SECTIONS
                *(.__rel_dyn_end)
        }
 
-       _end = .;
+       .end :
+       {
+               *(.__end)
+       }
+
+       _image_binary_end = .;
 
 /*
  * Compiler-generated __bss_start and __bss_end, see arch/arm/lib/bss.c
@@ -90,7 +95,7 @@ SECTIONS
                KEEP(*(.__bss_end));
        }
 
-       .dynsym _end : { *(.dynsym) }
+       .dynsym _image_binary_end : { *(.dynsym) }
        .dynbss : { *(.dynbss) }
        .dynstr : { *(.dynstr*) }
        .dynamic : { *(.dynamic*) }
index 8e3b73e..b22f9e0 100644 (file)
@@ -42,7 +42,11 @@ SECTIONS
        . = ALIGN(4);
 
        __image_copy_end = .;
-       _end = .;
+
+       .end :
+       {
+               *(.__end)
+       } >.sram
 
        .bss :
        {
index 6a734b3..ceb2022 100644 (file)
@@ -77,7 +77,12 @@ SECTIONS
                *(.__rel_dyn_end)
        }
 
-       _end = .;
+       .end :
+       {
+               *(.__end)
+       }
+
+       _image_binary_end = .;
 
        /*
         * Deprecated: this MMU section is used by pxa at present but
@@ -108,7 +113,7 @@ SECTIONS
                KEEP(*(.__bss_end));
        }
 
-       .dynsym _end : { *(.dynsym) }
+       .dynsym _image_binary_end : { *(.dynsym) }
        .dynbss : { *(.dynbss) }
        .dynstr : { *(.dynstr*) }
        .dynamic : { *(.dynamic*) }
index b6fdde4..5dbf94e 100644 (file)
@@ -54,7 +54,12 @@ SECTIONS
 
        . = ALIGN(0x800);
 
-       _end = .;
+       .end :
+       {
+               *(.__end)
+       }
+
+       _image_binary_end = .;
 
        .bss __rel_dyn_start (OVERLAY) : {
                __bss_start = .;
@@ -63,7 +68,7 @@ SECTIONS
                __bss_end = .;
        }
 
-       .dynsym _end : { *(.dynsym) }
+       .dynsym _image_binary_end : { *(.dynsym) }
        .dynbss : { *(.dynbss) }
        .dynstr : { *(.dynstr*) }
        .dynamic : { *(.dynamic*) }