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