Home | History | Annotate | Line # | Download | only in NSLU2_dram_0x01d00000
      1  1.2  thorpej /*	$NetBSD: ldscript,v 1.2 2020/02/12 18:11:30 thorpej Exp $	*/
      2  1.1  thorpej 
      3  1.1  thorpej OUTPUT_FORMAT("elf32-bigarm", "elf32-bigarm",
      4  1.1  thorpej 	      "elf32-littlearm")
      5  1.1  thorpej OUTPUT_ARCH(arm)
      6  1.1  thorpej ENTRY(SDRAM)
      7  1.1  thorpej MEMORY
      8  1.1  thorpej {
      9  1.1  thorpej   /* RedBoot will copy the gzboot+compressed kernel image from the
     10  1.1  thorpej      FIS partition starting @ 0x50060000 to the SDRAM location starting
     11  1.1  thorpej      at 0x01d00000.  gzboot will uncompress the kernel to 0x00200000.
     12  1.1  thorpej      NOTE: Even though there is room for 3M of gzboot+compressed kernel,
     13  1.1  thorpej      there is only room for 1M of this in the FIS partition.  So we declare
     14  1.1  thorpej      that same limit for "sdram" to simplify the linker script.  */
     15  1.1  thorpej   flash : o = 0x50060000, l = 1M
     16  1.1  thorpej   sdram : o = 0x01d00000, l = 1M	/* kernel loads at 0x00200000 */
     17  1.1  thorpej }
     18  1.1  thorpej SECTIONS
     19  1.1  thorpej {
     20  1.1  thorpej   SDRAM = 0x01d00000;
     21  1.1  thorpej 
     22  1.1  thorpej   /DISCARD/ : { *(.ARM.attributes*) *(.ARM.exidx) }
     23  1.1  thorpej 
     24  1.1  thorpej   /* Read-only sections, merged into text segment: */
     25  1.1  thorpej   __text_store = SDRAM;
     26  1.1  thorpej   .text      :
     27  1.1  thorpej   AT (SDRAM)
     28  1.1  thorpej   {
     29  1.1  thorpej     *(.text)
     30  1.1  thorpej     *(.text.*)
     31  1.1  thorpej     *(.stub)
     32  1.1  thorpej     *(.glue_7t) *(.glue_7)
     33  1.1  thorpej     *(.rodata) *(.rodata.*)
     34  1.1  thorpej   } > sdram =0
     35  1.1  thorpej   PROVIDE (__etext = .);
     36  1.1  thorpej   PROVIDE (_etext = .);
     37  1.1  thorpej   PROVIDE (etext = .);
     38  1.1  thorpej   __data_store = SDRAM + SIZEOF(.text);
     39  1.1  thorpej   .data    :
     40  1.1  thorpej   AT (LOADADDR(.text) + SIZEOF(.text))
     41  1.1  thorpej   {
     42  1.1  thorpej     __data_start = . ;
     43  1.1  thorpej     *(.data)
     44  1.1  thorpej     *(.data.*)
     45  1.1  thorpej   } > sdram
     46  1.1  thorpej   .sdata     :
     47  1.1  thorpej   AT (LOADADDR(.data) + SIZEOF(.data))
     48  1.1  thorpej   {
     49  1.1  thorpej     *(.sdata)
     50  1.1  thorpej     *(.sdata.*)
     51  1.1  thorpej     . = ALIGN(32 / 8);
     52  1.1  thorpej   } > sdram
     53  1.1  thorpej   _edata = .;
     54  1.1  thorpej   PROVIDE (edata = .);
     55  1.1  thorpej   __bss_start = .;
     56  1.1  thorpej   __bss_start__ = .;
     57  1.1  thorpej   .sbss      :
     58  1.2  thorpej   AT (LOADADDR(.sdata) + SIZEOF(.sdata))
     59  1.1  thorpej   {
     60  1.1  thorpej     PROVIDE (__sbss_start = .);
     61  1.1  thorpej     PROVIDE (___sbss_start = .);
     62  1.1  thorpej     *(.dynsbss)
     63  1.1  thorpej     *(.sbss)
     64  1.1  thorpej     *(.sbss.*)
     65  1.1  thorpej     *(.scommon)
     66  1.1  thorpej     PROVIDE (__sbss_end = .);
     67  1.1  thorpej     PROVIDE (___sbss_end = .);
     68  1.1  thorpej   } > sdram
     69  1.1  thorpej   .bss       :
     70  1.2  thorpej   AT (LOADADDR(.sbss) + SIZEOF(.sbss))
     71  1.1  thorpej   {
     72  1.1  thorpej    *(.dynbss)
     73  1.1  thorpej    *(.bss)
     74  1.1  thorpej    *(.bss.*)
     75  1.1  thorpej    *(COMMON)
     76  1.1  thorpej    /* Align here to ensure that the .bss section occupies space up to
     77  1.1  thorpej       _end.  Align after .bss to ensure correct alignment even if the
     78  1.1  thorpej       .bss section disappears because there are no input sections.  */
     79  1.1  thorpej    . = ALIGN(32 / 8);
     80  1.1  thorpej   } > sdram
     81  1.1  thorpej   . = ALIGN(32 / 8);
     82  1.1  thorpej   _end = .;
     83  1.1  thorpej   _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
     84  1.1  thorpej   PROVIDE (end = .);
     85  1.2  thorpej   .image     :
     86  1.2  thorpej   AT (LOADADDR(.bss) + SIZEOF(.bss))
     87  1.1  thorpej   {
     88  1.1  thorpej     *(.image)
     89  1.2  thorpej   } > sdram
     90  1.1  thorpej }
     91