source: rtems/c/src/lib/libbsp/powerpc/helas403/startup/linkcmds @ 0b5da30a

4.104.114.84.95
Last change on this file since 0b5da30a was 0b5da30a, checked in by Joel Sherrill <joel.sherrill@…>, on 04/08/02 at 15:56:57

2001-04-08 Joel Sherrill <joel@…>

  • startup/linkcmds, startup/linkcmds.dl : Per PR170, PR171, and PR172 add .eh_frame.
  • Property mode set to 100644
File size: 5.3 KB
Line 
1/*
2 *  This file contains directives for the GNU linker which are specific
3 *  to the helas-403
4 *  This file is intended to be used together with flashentry.s
5 *  it will generate a ROM that can be started directly after powerup reset
6 *  $Id$
7 */
8
9OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
10              "elf32-powerpc")
11OUTPUT_ARCH(powerpc)
12 SEARCH_DIR(/usr/local/powerpc-rtems/lib);
13 
14ENTRY(flash_entry)
15 
16MEMORY
17  {
18        RAM : ORIGIN = 0, LENGTH = 8M
19        FLASH : ORIGIN = 0xFFF00000, LENGTH = 512K
20  }
21
22  /* DIRTY TRICK: repeat addresses here, so we can work with them... */
23  flash.start = 0xFFF00000;
24  flash.size  = 512K;
25
26SECTIONS
27{
28  .entry :
29  {
30     *(.entry)
31  } > FLASH /* this is ROM for flash_entry */
32  .text :
33  {
34     text.start = . ;
35     *(.entry2)
36     *(.text)
37     *(.rodata)
38     *(.rodata1)
39     *.(eh_frame)
40     *(.descriptors)
41     *(rom_ver)
42     etext = ALIGN(0x10);
43     _etext = .;
44
45
46     __CTOR_LIST__ = .;
47     LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
48     *(.ctors)
49     LONG(0)
50     __CTOR_END__ = .;
51
52     __DTOR_LIST__ = .;
53     LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
54     *(.dtors)
55     LONG(0)
56     __DTOR_END__ = .;
57
58     *(.lit)
59     *(.shdata)
60     _init = .; *(.init)
61     _fini = .; *(.fini)
62     . = ALIGN(0x10);
63     _endtext = .;
64     text.end = .;
65     copy.src = .;
66     copy.tmptop.txt = .;
67  } > FLASH /* this is ROM for flash_entry */
68
69  text.size = text.end - text.start;
70
71  /* R/W Data */
72  /* place vectors to start at offset 0x100... */
73  /* IMPORTANT: sections ".fill" and ".vectors" must be the first in RAM!!*/
74  .fill 0x00010000 :
75  {
76    . = . + 0x0100;
77  } > RAM
78 
79  .vectors :              AT (copy.src)
80  {
81    copy.dest = .;
82    *(.vectors)
83    . = ALIGN(0x10);
84    copy.tmptop.vec = .;
85  } > RAM
86
87  .data :                 AT (copy.tmptop.vec - copy.dest + copy.src)
88  {
89    *(.data)
90    *(.data1)
91    PROVIDE (__SDATA_START__ = .);
92    *(.sdata)
93    . = ALIGN(0x10);
94    copy.tmptop.dat = .;
95  } > RAM
96 
97  PROVIDE (__EXCEPT_START__ = .);
98  .gcc_except_table   :   AT (copy.tmptop.dat - copy.dest + copy.src)
99  {
100    *(.gcc_except_table)
101    . = ALIGN(0x10);
102    copy.tmptop.exc = .;
103  } >RAM
104  PROVIDE (__EXCEPT_END__ = .);
105
106  __GOT_START__ = .;
107  .got :                  AT (copy.tmptop.exc - copy.dest + copy.src)
108  {
109    s.got = .;
110    *(.got.plt) *(.got)
111    . = ALIGN(0x10);
112    copy.tmptop.got = .;
113  } > RAM
114  __GOT_END__ = .;
115
116  .got1 :                 AT (copy.tmptop.got - copy.dest + copy.src)
117  {
118    *(.got1)           
119    . = ALIGN(0x10);
120    copy.tmptop.gt1 = .;
121  } >RAM
122
123  PROVIDE (__GOT2_START__ = .);
124  PROVIDE (_GOT2_START_ = .);
125  .got2           :       AT (copy.tmptop.gt1 - copy.dest + copy.src)
126  {
127    *(.got2)   
128    . = ALIGN(0x10);
129    copy.tmptop.gt2 = .;
130  } >RAM
131  PROVIDE (__GOT2_END__ = .);
132  PROVIDE (_GOT2_END_ = .);
133
134  PROVIDE (__FIXUP_START__ = .);
135  PROVIDE (_FIXUP_START_ = .);
136  .fixup          :       AT (copy.tmptop.gt2 - copy.dest + copy.src)
137  {
138    *(.fixup)   
139    . = ALIGN(0x10);
140    copy.tmptop.fix = .;
141  } >RAM
142  PROVIDE (_FIXUP_END_ = .);
143  PROVIDE (__FIXUP_END__ = .);
144 
145  PROVIDE (__SDATA2_START__ = .);
146  .sdata2         :       AT (copy.tmptop.fix - copy.dest + copy.src)
147  {
148    *(.sdata2) 
149    . = ALIGN(0x10);
150    copy.tmptop.sda = .;
151  } >RAM
152
153  copy.size = copy.tmptop.sda - copy.dest;
154
155  .sbss2          :
156  {
157    *(.sbss2)   
158  } >RAM
159  PROVIDE (__SBSS2_END__ = .);
160
161  __SBSS_START__ = .;
162  .bss :
163  {
164    bss.start = .;
165    *(.bss) *(.sbss) *(COMMON)
166    bss.end = ALIGN(4);
167  } > RAM
168  __SBSS_END__ = .;
169 
170  bss.size = bss.end - bss.start;
171
172  /* reserve 16KByte for stack... */
173  stack.end = bss.end + 16K;
174  PROVIDE(_end = stack.end);
175
176
177  /* Stabs debugging sections.  */
178  .stab 0 : { *(.stab) }
179  .stabstr 0 : { *(.stabstr) }
180  .stab.excl 0 : { *(.stab.excl) }
181  .stab.exclstr 0 : { *(.stab.exclstr) }
182  .stab.index 0 : { *(.stab.index) }
183  .stab.indexstr 0 : { *(.stab.indexstr) }
184  .comment 0 : { *(.comment) }
185
186  /* DWARF debug sections.
187     Symbols in the DWARF debugging sections are relative to the beginning
188     of the section so we begin them at 0.  */
189  /* DWARF 1 */
190  .debug          0 : { *(.debug) }
191  .line           0 : { *(.line) }
192 
193  /* GNU DWARF 1 extensions */
194  .debug_srcinfo  0 : { *(.debug_srcinfo) }
195  .debug_sfnames  0 : { *(.debug_sfnames) }
196 
197  /* DWARF 1.1 and DWARF 2 */
198  .debug_aranges  0 : { *(.debug_aranges) }
199  .debug_pubnames 0 : { *(.debug_pubnames) }
200 
201  /* DWARF 2 */
202  .debug_info     0 : { *(.debug_info) }
203  .debug_abbrev   0 : { *(.debug_abbrev) }
204  .debug_line     0 : { *(.debug_line) }
205  .debug_frame    0 : { *(.debug_frame) }
206  .debug_str      0 : { *(.debug_str) }
207  .debug_loc      0 : { *(.debug_loc) }
208  .debug_macinfo  0 : { *(.debug_macinfo) }
209 
210  /* SGI/MIPS DWARF 2 extensions */
211  .debug_weaknames 0 : { *(.debug_weaknames) }
212  .debug_funcnames 0 : { *(.debug_funcnames) }
213  .debug_typenames 0 : { *(.debug_typenames) }
214  .debug_varnames  0 : { *(.debug_varnames) }
215
216  /* These must appear regardless of  .  */
217  /*
218   * place reset instruction into last word of FLASH
219   * NOTE: after reset, PPC403 starts executing from address
220   * 0xFFFFFFFC
221   * The reset section is placed in ROM at 0xF7FFFFFC instead,
222   * but a mirror of this address exists at 0xFFFFFFFC due to
223   * the initial memory controller setup
224   */
225  .reset  flash.start - 4 + flash.size :
226  {
227    *(.reset)
228  } > FLASH
229}
230
231
Note: See TracBrowser for help on using the repository browser.