]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/u-boot.lds
Merge branch 'master' of git://git.denx.de/u-boot-imx
[karo-tx-uboot.git] / arch / arm / cpu / u-boot.lds
index 9463a33dcb3dab4b99f558b5774a25787df9486f..7336162d804f0d0f55a5f0cdf1df9ff927ce683e 100644 (file)
@@ -7,6 +7,8 @@
  * SPDX-License-Identifier:    GPL-2.0+
  */
 
+#include <config.h>
+
 OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
 OUTPUT_ARCH(arm)
 ENTRY(_start)
@@ -18,10 +20,39 @@ SECTIONS
        .text :
        {
                *(.__image_copy_start)
+               *(.vectors)
                CPUDIR/start.o (.text*)
                *(.text*)
        }
 
+#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT) || defined(CONFIG_ARMV7_PSCI)
+
+#ifndef CONFIG_ARMV7_SECURE_BASE
+#define CONFIG_ARMV7_SECURE_BASE
+#endif
+
+       .__secure_start : {
+               . = ALIGN(0x1000);
+               *(.__secure_start)
+       }
+
+       .secure_text CONFIG_ARMV7_SECURE_BASE :
+               AT(ADDR(.__secure_start) + SIZEOF(.__secure_start))
+       {
+               *(._secure.text)
+       }
+
+       . = LOADADDR(.__secure_start) +
+               SIZEOF(.__secure_start) +
+               SIZEOF(.secure_text);
+
+       __secure_end_lma = .;
+       .__secure_end : AT(__secure_end_lma) {
+               *(.__secure_end)
+               LONG(0x1d1071c);        /* Must output something to reset LMA */
+       }
+#endif
+
        . = ALIGN(4);
        .rodata : { *(SORT_BY_ALIGNMENT(SORT_BY_NAME(.rodata*))) }
 
@@ -60,7 +91,12 @@ SECTIONS
                *(.__rel_dyn_end)
        }
 
-       _end = .;
+       .end :
+       {
+               *(.__end)
+       }
+
+       _image_binary_end = .;
 
        /*
         * Deprecated: this MMU section is used by pxa at present but
@@ -91,14 +127,14 @@ SECTIONS
                KEEP(*(.__bss_end));
        }
 
-       .dynsym _end : { *(.dynsym) }
-       .hash : { *(.hash) }
-       .got.plt : { *(.got.plt) }
+       .dynsym _image_binary_end : { *(.dynsym) }
        .dynbss : { *(.dynbss) }
        .dynstr : { *(.dynstr*) }
        .dynamic : { *(.dynamic*) }
        .plt : { *(.plt*) }
        .interp : { *(.interp*) }
+       .gnu.hash : { *(.gnu.hash) }
        .gnu : { *(.gnu*) }
        .ARM.exidx : { *(.ARM.exidx*) }
+       .gnu.linkonce.armexidx : { *(.gnu.linkonce.armexidx.*) }
 }