SPDX: Convert all of our single license tags to Linux Kernel style
[oweals/u-boot.git] / arch / nios2 / cpu / u-boot.lds
index f937396233edadf16a5eec49170fbff15fdb6c77..cbf54b46103faaf2925e5cba7c98a1e49ff73bce 100644 (file)
@@ -1,26 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * (C) Copyright 2004, Psyent Corporation <www.psyent.com>
  * Scott McNutt <smcnutt@psyent.com>
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
  */
 
+#include <config.h>
 
 OUTPUT_FORMAT("elf32-littlenios2")
 OUTPUT_ARCH(nios2)
@@ -28,6 +12,7 @@ ENTRY(_start)
 
 SECTIONS
 {
+       . = CONFIG_SYS_MONITOR_BASE;
        .text :
        {
          arch/nios2/cpu/start.o (.text)
@@ -64,9 +49,11 @@ SECTIONS
          *(.gnu.linkonce.d*)
        }
 
-       . = ALIGN(16);
-       _gp = .;                        /* Global pointer addr */
-       PROVIDE (gp = .);
+       /*
+        * gp - Since we don't use gp for small data with option "-G0",
+        * we will use gp as global data pointer. The _gp location is
+        * not needed.
+        */
 
        .sdata :
        {
@@ -79,6 +66,12 @@ SECTIONS
        _edata = .;
        PROVIDE (edata = .);
 
+       /*
+        * _end - This is end of u-boot.bin image.
+        * dtb will be appended here to make u-boot-dtb.bin
+        */
+       _end = .;
+
        /* UNINIT DATA - Small uninitialized data is first so it's
         * adjacent to sdata and can be referenced via gp. The normal
         * bss follows. We keep it adjacent to simplify init code.
@@ -101,7 +94,7 @@ SECTIONS
          *(.scommon)
        }
        . = ALIGN(4);
-       __bss_end__ = .;
+       __bss_end = .;
        PROVIDE (end = .);
 
        /* DEBUG -- symbol table, string table, etc. etc.