source: rtems/c/src/lib/libbsp/powerpc/mbx8xx/startup/linkcmds @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 8.0 KB
Line 
1/*
2 *  This file contains directives for the GNU linker that are specific
3 *  to the MBX860-2 board.
4 */
5
6OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
7OUTPUT_ARCH(powerpc)
8ENTRY(_start)
9
10/*
11 * Declare some sizes.
12 * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
13 *      number used there is not constant.  If this happens to you, edit
14 *      the lines marked XXX below to use a constant value.
15 */
16StackSize = DEFINED(StackSize) ? StackSize : 0x1000;
17RamBase = DEFINED(RamBase) ? RamBase : 0;
18RamSize = DEFINED(RamSize) ? RamSize : 4M;
19HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
20 
21MEMORY
22  {
23    ram : org = 0x0, l = 4M
24    nvram : org = 0xfa000000, l = 32K
25    dpram : org = 0xfa200000, l = 16K
26    flash : org = 0xfc000000, l = 2M
27    immr  : org = 0xfa200000, l = 16K
28  }
29
30
31SECTIONS
32{
33  /*
34   *  If the vectors are specified statically rather than created at run time,
35   *  accumulate them starting at VMA 0x0.
36   */
37  .vectors :
38  {
39    *(.vectors)
40  } >ram
41
42  /*
43   *  The stack will live in this area - between the vectors and
44   *  the text section.
45   */
46 
47  .text 0x10000:
48  {
49    /* Read-only sections, merged into text segment: */
50   
51    text.start = .;
52
53    /* Entry point is the .entry section */
54    *(.entry)
55    *(.entry2)
56
57    /* Actual code */
58    *(.text*)
59       
60    /* C++ constructors/destructors */
61    *(.gnu.linkonce.t*)
62       
63    /*  Initialization and finalization code.
64     *
65     *  Various files can provide initialization and finalization functions.
66     *  The bodies of these functions are in .init and .fini sections. We
67     *  accumulate the bodies here, and prepend function prologues from
68     *  ecrti.o and function epilogues from ecrtn.o. ecrti.o must be linked
69     *  first; ecrtn.o must be linked last. Because these are wildcards, it
70     *  doesn't matter if the user does not actually link against ecrti.o and
71     *  ecrtn.o; the linker won't look for a file to match a wildcard.  The
72     *  wildcard also means that it doesn't matter which directory ecrti.o
73     *  and ecrtn.o are in.
74     */
75    PROVIDE (_init = .);
76    *ecrti.o(.init)
77    *(.init)
78    *ecrtn.o(.init)
79   
80    PROVIDE (_fini = .);
81    *ecrti.o(.fini)
82    *(.fini)
83    *ecrtn.o(.init)
84
85    /*
86     *  C++ constructors and destructors for static objects.
87     *  PowerPC EABI does not use crtstuff yet, so we build "old-style"
88     *  constructor and destructor lists that begin with the list lenght
89     *  end terminate with a NULL entry.
90     */
91     
92    PROVIDE (__CTOR_LIST__ = .);       
93    /* LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) */
94    *crtbegin.o(.ctors)
95    *(.ctors)
96    *crtend.o(.ctors)
97    LONG(0)
98    PROVIDE (__CTOR_END__ = .);
99 
100    PROVIDE (__DTOR_LIST__ = .);
101    /* LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) */
102    *crtbegin.o(.dtors)
103    *(.dtors)
104    *crtend.o(.dtors)
105    LONG(0)
106    PROVIDE (__DTOR_END__ = .);
107 
108    /*
109     * Special FreeBSD sysctl sections.
110     */
111    . = ALIGN (16);
112    __start_set_sysctl_set = .;
113    *(set_sysctl_*);
114    __stop_set_sysctl_set = ABSOLUTE(.);
115    *(set_domain_*);
116    *(set_pseudo_*);
117
118    /* Exception frame info */
119    *(.eh_frame)
120
121   /* Miscellaneous read-only data */
122    _rodata_start = . ;
123    *(.gnu.linkonce.r*)
124    *(.lit)
125    *(.shdata)
126    *(.rodata*)
127    *(.rodata1)
128    *(.descriptors)
129    *(rom_ver)
130    _erodata = .;
131
132
133    /* Various possible names for the end of the .text section */
134    etext = ALIGN(0x10);
135    _etext = .;
136    _endtext = .;
137    text.end = .;
138    PROVIDE (etext = .);
139    PROVIDE (__etext = .);
140 } > ram
141 
142  .rel.dyn        :
143    {
144      *(.rel.init)
145      *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
146      *(.rel.fini)
147      *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
148      *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
149      *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
150      *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
151      *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
152      *(.rel.ctors)
153      *(.rel.dtors)
154      *(.rel.got)
155      *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
156      *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
157      *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
158      *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
159      *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
160    } >ram
161  .rela.dyn       :
162    {
163      *(.rela.init)
164      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
165      *(.rela.fini)
166      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
167      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
168      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
169      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
170      *(.rela.ctors)
171      *(.rela.dtors)
172      *(.rela.got)
173      *(.rela.got1)
174      *(.rela.got2)
175      *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
176      *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
177      *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
178      *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
179      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
180    } >ram
181  .rel.plt        : { *(.rel.plt) }
182  .rela.plt       : { *(.rela.plt) }
183
184  /* R/W Data */
185  .data :
186  {
187    data_start = .;
188   
189    *(.data)
190    *(.data.*)
191    *(.data1)
192   
193    PROVIDE (__EXCEPT_START__ = .);
194    *(.gcc_except_table*)
195    PROVIDE (__EXCEPT_END__ = .);
196   
197    PROVIDE(__GOT_START__ = .);
198    *(.got.plt)
199    *(.got)
200    PROVIDE(__GOT_END__ = .);
201 
202    *(.got1)
203   
204    PROVIDE (__GOT2_START__ = .);
205    PROVIDE (_GOT2_START_ = .);
206    *(.got2)
207    PROVIDE (__GOT2_END__ = .);
208    PROVIDE (_GOT2_END_ = .);
209 
210    PROVIDE (__FIXUP_START__ = .);
211    PROVIDE (_FIXUP_START_ = .);
212    *(.fixup)
213    PROVIDE (_FIXUP_END_ = .);
214    PROVIDE (__FIXUP_END__ = .);
215  } > ram
216 
217  .sdata : {
218    PROVIDE (_SDA_BASE_ = 32768);
219    *(.sdata .sdata.* .gnu.linkonce.s.*)
220  } > ram
221
222  .sbss : {
223    __bss_start = .;
224
225    PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);
226    *(.scommon)
227    *(.dynsbss)
228    *(.sbss .sbss.* .gnu.linkonce.sb.*)
229    PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);
230  } > ram
231
232  .sdata2 : {
233    PROVIDE (_SDA2_BASE_ = 32768);
234
235    *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
236  } > ram =0
237
238  .sbss2 : {
239    *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
240  } > ram =0
241   
242  .bss :
243  {
244    bss.start = .;
245    *(.bss .bss* .gnu.linkonce.b*)
246    *(COMMON)
247    . = ALIGN(4);
248    bss.end = .;
249
250  } > ram
251 
252  bss.size = bss.end - bss.start;
253  text.size = text.end - text.start;
254  PROVIDE(_end = bss.end);
255  /*
256   * Interrupt stack setup
257   */
258
259  IntrStack_start = ALIGN(0x10);
260  . += 0x4000;
261  intrStack = .;
262  PROVIDE(intrStackPtr = intrStack);
263
264  WorkAreaBase = .;
265
266  dpram :
267  {
268  m8xx = .;
269  _m8xx = .;
270  /*   . += (16 * 1024); this makes the mbx loader crash */
271  } >immr
272
273  /* Stabs debugging sections.  */
274  .stab 0 : { *(.stab) }
275  .stabstr 0 : { *(.stabstr) }
276  .stab.excl 0 : { *(.stab.excl) }
277  .stab.exclstr 0 : { *(.stab.exclstr) }
278  .stab.index 0 : { *(.stab.index) }
279  .stab.indexstr 0 : { *(.stab.indexstr) }
280  .comment 0 : { *(.comment) }
281 
282  /* DWARF debug sections.
283     Symbols in the DWARF debugging sections are relative to the beginning
284     of the section so we begin them at 0.  */
285  /* DWARF 1 */
286  .debug          0 : { *(.debug) }
287  .line           0 : { *(.line) }
288 
289  /* GNU DWARF 1 extensions */
290  .debug_srcinfo  0 : { *(.debug_srcinfo) }
291  .debug_sfnames  0 : { *(.debug_sfnames) }
292 
293  /* DWARF 1.1 and DWARF 2 */
294  .debug_aranges  0 : { *(.debug_aranges) }
295  .debug_pubnames 0 : { *(.debug_pubnames) }
296 
297  /* DWARF 2 */
298  .debug_info     0 : { *(.debug_info) }
299  .debug_abbrev   0 : { *(.debug_abbrev) }
300  .debug_line     0 : { *(.debug_line) }
301  .debug_frame    0 : { *(.debug_frame) }
302  .debug_str      0 : { *(.debug_str) }
303  .debug_loc      0 : { *(.debug_loc) }
304  .debug_macinfo  0 : { *(.debug_macinfo) }
305 
306  /* SGI/MIPS DWARF 2 extensions */
307  .debug_weaknames 0 : { *(.debug_weaknames) }
308  .debug_funcnames 0 : { *(.debug_funcnames) }
309  .debug_typenames 0 : { *(.debug_typenames) }
310  .debug_varnames  0 : { *(.debug_varnames) }
311  /* These must appear regardless of  .  */
312}
Note: See TracBrowser for help on using the repository browser.