ldscript revision 1.2
1/*	$NetBSD: ldscript,v 1.2 2003/05/26 15:07:53 thorpej 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  } > sdram
45  _edata = .;
46  PROVIDE (edata = .);
47  __bss_start = .;
48  __bss_start__ = .;
49  .sbss      :
50  {
51    PROVIDE (__sbss_start = .);
52    PROVIDE (___sbss_start = .);
53    *(.dynsbss)
54    *(.sbss)
55    *(.sbss.*)
56    *(.scommon)
57    PROVIDE (__sbss_end = .);
58    PROVIDE (___sbss_end = .);
59  } > sdram
60  .bss       :
61  {
62   *(.dynbss)
63   *(.bss)
64   *(.bss.*)
65   *(COMMON)
66   /* Align here to ensure that the .bss section occupies space up to
67      _end.  Align after .bss to ensure correct alignment even if the
68      .bss section disappears because there are no input sections.  */
69   . = ALIGN(32 / 8);
70  } > sdram
71  . = ALIGN(32 / 8);
72  _end = .;
73  _bss_end__ = . ; __bss_end__ = . ; __end__ = . ;
74  PROVIDE (end = .);
75  .image   (FLASH + SIZEOF(.text) + SIZEOF(.data) + SIZEOF(.sdata)) :
76  AT (LOADADDR(.sdata) + SIZEOF(.sdata))
77  {
78    *(.image)
79  }
80}
81