xref: /netbsd-src/sys/arch/evbarm/stand/gzboot/ADI_BRH_flash_0x00140000/ldscript (revision eb961d0e02b7a46a9acfa877b02df48df6637278)
1/*	$NetBSD: ldscript,v 1.4 2005/12/11 12:17:10 christos Exp $	*/
2
3OUTPUT_ARCH(arm)
4ENTRY(FLASH)
5MEMORY
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}
13SECTIONS
14{
15  FLASH = 0x00140000;
16
17  /* Read-only sections, merged into text segment: */
18  __text_store = FLASH;
19  .text      :
20  AT (FLASH)
21  {
22    *(.text)
23    *(.text.*)
24    *(.stub)
25    *(.glue_7t) *(.glue_7)
26    *(.rodata) *(.rodata.*)
27  } > sdram =0
28  PROVIDE (__etext = .);
29  PROVIDE (_etext = .);
30  PROVIDE (etext = .);
31  __data_store = FLASH + SIZEOF(.text);
32  .data    :
33  AT (LOADADDR(.text) + SIZEOF(.text))
34  {
35    __data_start = . ;
36    *(.data)
37    *(.data.*)
38  } > sdram
39  .sdata     :
40  AT (LOADADDR(.data) + SIZEOF(.data))
41  {
42    *(.sdata)
43    *(.sdata.*)
44    . = ALIGN(32 / 8);
45  } > sdram
46  _edata = .;
47  PROVIDE (edata = .);
48  __bss_start = .;
49  __bss_start__ = .;
50  .sbss      :
51  {
52    PROVIDE (__sbss_start = .);
53    PROVIDE (___sbss_start = .);
54    *(.dynsbss)
55    *(.sbss)
56    *(.sbss.*)
57    *(.scommon)
58    PROVIDE (__sbss_end = .);
59    PROVIDE (___sbss_end = .);
60  } > sdram
61  .bss       :
62  {
63   *(.dynbss)
64   *(.bss)
65   *(.bss.*)
66   *(COMMON)
67   /* Align here to ensure that the .bss section occupies space up to
68      _end.  Align after .bss to ensure correct alignment even if the
69      .bss section disappears because there are no input sections.  */
70   . = ALIGN(32 / 8);
71  } > sdram
72  . = ALIGN(32 / 8);
73  _end = .;
74  _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
75  PROVIDE (end = .);
76  .image   (FLASH + SIZEOF(.text) + SIZEOF(.data) + SIZEOF(.sdata)) :
77  AT (LOADADDR(.sdata) + SIZEOF(.sdata))
78  {
79    *(.image)
80  }
81}
82