Home | History | Annotate | Line # | Download | only in GEMINI_dram_0x01600000
      1  1.3   matt /*	$NetBSD: ldscript,v 1.3 2012/08/06 02:14:15 matt Exp $	*/
      2  1.1  cliff 
      3  1.1  cliff OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm",
      4  1.1  cliff 	      "elf32-littlearm")
      5  1.1  cliff OUTPUT_ARCH(arm)
      6  1.1  cliff ENTRY(GZBOOT)
      7  1.1  cliff MEMORY
      8  1.1  cliff {
      9  1.1  cliff   /* We will locate the .text section in flash, and will run directly
     10  1.1  cliff      from there just long enough to relocate our .text and .data into
     11  1.1  cliff      a small chunk of SDRAM starting at (SDRAM + 1M).  */
     12  1.1  cliff   gzboot : o = 0x01600000, l = 6M
     13  1.1  cliff   sdram : o = 0x00200000, l = 2M	/* kernel loads at 0x00200000 */
     14  1.1  cliff }
     15  1.1  cliff SECTIONS
     16  1.1  cliff {
     17  1.1  cliff   GZBOOT = 0x01600000;
     18  1.1  cliff 
     19  1.3   matt   /DISCARD/ : { *(.ARM.attributes*) *(.ARM.exidx) }
     20  1.3   matt 
     21  1.1  cliff   /* Read-only sections, merged into text segment: */
     22  1.1  cliff   __text_store = GZBOOT;
     23  1.1  cliff   .text      :
     24  1.1  cliff   AT (GZBOOT)
     25  1.1  cliff   {
     26  1.1  cliff     *(.text)
     27  1.1  cliff     *(.text.*)
     28  1.1  cliff     *(.stub)
     29  1.1  cliff     *(.glue_7t) *(.glue_7)
     30  1.1  cliff     *(.rodata) *(.rodata.*)
     31  1.1  cliff   } > gzboot =0
     32  1.1  cliff   PROVIDE (__etext = .);
     33  1.1  cliff   PROVIDE (_etext = .);
     34  1.1  cliff   PROVIDE (etext = .);
     35  1.1  cliff   __data_store = GZBOOT + SIZEOF(.text);
     36  1.1  cliff   .data    :
     37  1.1  cliff   AT (LOADADDR(.text) + SIZEOF(.text))
     38  1.1  cliff   {
     39  1.1  cliff     __data_start = . ;
     40  1.1  cliff     *(.data)
     41  1.1  cliff     *(.data.*)
     42  1.1  cliff   } > gzboot
     43  1.1  cliff   .sdata     :
     44  1.1  cliff   AT (LOADADDR(.data) + SIZEOF(.data))
     45  1.1  cliff   {
     46  1.1  cliff     *(.sdata)
     47  1.1  cliff     *(.sdata.*)
     48  1.1  cliff     . = ALIGN(32 / 8);
     49  1.1  cliff   } > gzboot
     50  1.1  cliff   _edata = .;
     51  1.1  cliff   PROVIDE (edata = .);
     52  1.1  cliff   __bss_start = .;
     53  1.1  cliff   __bss_start__ = .;
     54  1.1  cliff   .sbss      :
     55  1.2  skrll   AT (ADDR(.sbss))
     56  1.1  cliff   {
     57  1.1  cliff     PROVIDE (__sbss_start = .);
     58  1.1  cliff     PROVIDE (___sbss_start = .);
     59  1.1  cliff     *(.dynsbss)
     60  1.1  cliff     *(.sbss)
     61  1.1  cliff     *(.sbss.*)
     62  1.1  cliff     *(.scommon)
     63  1.1  cliff     PROVIDE (__sbss_end = .);
     64  1.1  cliff     PROVIDE (___sbss_end = .);
     65  1.1  cliff   } > gzboot
     66  1.1  cliff   .bss       :
     67  1.2  skrll   AT (ADDR(.bss))
     68  1.1  cliff   {
     69  1.1  cliff    *(.dynbss)
     70  1.1  cliff    *(.bss)
     71  1.1  cliff    *(.bss.*)
     72  1.1  cliff    *(COMMON)
     73  1.1  cliff    /* Align here to ensure that the .bss section occupies space up to
     74  1.1  cliff       _end.  Align after .bss to ensure correct alignment even if the
     75  1.1  cliff       .bss section disappears because there are no input sections.  */
     76  1.1  cliff    . = ALIGN(32 / 8);
     77  1.1  cliff   } > gzboot
     78  1.1  cliff   . = ALIGN(32 / 8);
     79  1.1  cliff   _end = .;
     80  1.1  cliff   _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
     81  1.1  cliff   PROVIDE (end = .);
     82  1.1  cliff   .image	:
     83  1.1  cliff   {
     84  1.1  cliff     *(.image)
     85  1.1  cliff   } > gzboot
     86  1.1  cliff }
     87