source: rtems/c/src/lib/libbsp/powerpc/mpc8260ads/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.1 KB
Line 
1/*
2 *  This file contains directives for the GNU linker which are specific
3 *  to the MPC8260ADS Board
4 */
5
6OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
7              "elf32-powerpc")
8OUTPUT_ARCH(powerpc)
9
10ENTRY(start)
11
12/*
13 * Declare some sizes.
14 * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
15 *      number used there is not constant.  If this happens to you, edit
16 *      the lines marked XXX below to use a constant value.
17 */
18StackSize   = DEFINED(StackSize) ? StackSize : 0x8000;
19RamBase     = DEFINED(RamBase) ? RamBase : 0x0;
20RamSize     = DEFINED(RamSize) ? RamDiskSize : 0x0800000; /* 8M program ram */
21HeapSize    = DEFINED(HeapSize) ? HeapSize : 0x0;
22RamDiskBase = DEFINED(RamDiskBase) ? RamDiskBase : 0x0800000;
23RamDiskSize = DEFINED(RamDiskSize) ? RamDiskSize : 0x0800000; /* 8M ram disk */
24
25MEMORY
26{
27  ram : org = 0x0, l = 8M
28  ramdisk : org = 0x0800000, l = 8M
29  dpram : org = 0x04700000, l = 128K
30  flash : org = 0xff800000, l = 8M
31}
32
33
34SECTIONS
35{
36    /*
37     * The stack will live in this area - between the vectors and
38     * the text section.
39     */
40
41    .text 0x10000:
42    {
43    _textbase = .;
44
45
46    text.start = .;
47
48    /* Entry point is the .entry section */
49    *(.entry)
50    *(.entry2)
51
52    /* Actual Code */
53    *(.text*)
54
55
56    *(.rodata*)
57    *(.rodata1)
58
59
60    /*
61     * Special FreeBSD sysctl sections.
62     */
63    . = ALIGN (16);
64    __start_set_sysctl_set = .;
65    *(set_sysctl_*);
66    __stop_set_sysctl_set = ABSOLUTE(.);
67    *(set_domain_*);
68    *(set_pseudo_*);
69
70    /* C++ constructors/destructors */
71    *(.gnu.linkonce.t*)
72
73    /*  Initialization and finalization code.
74     *
75     *  Various files can provide initialization and finalization functions.
76     *  The bodies of these functions are in .init and .fini sections. We
77     *  accumulate the bodies here, and prepend function prologues from
78     *  ecrti.o and function epilogues from ecrtn.o. ecrti.o must be linked
79     *  first; ecrtn.o must be linked last. Because these are wildcards, it
80     *  doesn't matter if the user does not actually link against ecrti.o and
81     *  ecrtn.o; the linker won't look for a file to match a wildcard.  The
82     *  wildcard also means that it doesn't matter which directory ecrti.o
83     *  and ecrtn.o are in.
84     */
85    PROVIDE (_init = .);
86    *ecrti.o(.init)
87    *(.init)
88    *ecrtn.o(.init)
89
90    PROVIDE (_fini = .);
91    *ecrti.o(.fini)
92    *(.fini)
93    *ecrtn.o(.init)
94
95    /*
96     *  C++ constructors and destructors for static objects.
97     *  PowerPC EABI does not use crtstuff yet, so we build "old-style"
98     *  constructor and destructor lists that begin with the list lenght
99     *  end terminate with a NULL entry.
100     */
101
102    PROVIDE (__CTOR_LIST__ = .);       
103    /* LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) */
104    *crtbegin.o(.ctors)
105    *(.ctors)
106    *crtend.o(.ctors)
107    LONG(0)
108    PROVIDE (__CTOR_END__ = .);
109
110    PROVIDE (__DTOR_LIST__ = .);
111    /* LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) */
112    *crtbegin.o(.dtors)
113    *(.dtors)
114    *crtend.o(.dtors)
115    LONG(0)
116    PROVIDE (__DTOR_END__ = .);
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
141    } > ram
142
143
144  .rel.dyn        :
145    {
146      *(.rel.init)
147      *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
148      *(.rel.fini)
149      *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
150      *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
151      *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
152      *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
153      *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
154      *(.rel.ctors)
155      *(.rel.dtors)
156      *(.rel.got)
157      *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
158      *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
159      *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
160      *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
161      *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
162    } >ram
163  .rela.dyn       :
164    {
165      *(.rela.init)
166      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
167      *(.rela.fini)
168      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
169      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
170      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
171      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
172      *(.rela.ctors)
173      *(.rela.dtors)
174      *(.rela.got)
175      *(.rela.got1)
176      *(.rela.got2)
177      *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
178      *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
179      *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
180      *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
181      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
182    } >ram
183  .rel.plt        : { *(.rel.plt) }
184  .rela.plt       : { *(.rela.plt) }
185
186    PROVIDE (__EXCEPT_START__ = .);
187    .gcc_except_table   : { *(.gcc_except_table*) } >ram
188    PROVIDE (__EXCEPT_END__ = .);
189    __GOT_START__ = .;
190    .got :
191    {
192      s.got = .;
193      *(.got.plt) *(.got)
194    } > ram
195    __GOT_END__ = .;
196
197    .got1                 : { *(.got1)          } >ram
198    PROVIDE (__GOT2_START__ = .);
199    PROVIDE (_GOT2_START_ = .);
200    .got2                 :  { *(.got2)         } >ram
201    PROVIDE (__GOT2_END__ = .);
202    PROVIDE (_GOT2_END_ = .);
203
204    PROVIDE (__FIXUP_START__ = .);
205    PROVIDE (_FIXUP_START_ = .);
206    .fixup        : { *(.fixup)         } >ram
207    PROVIDE (_FIXUP_END_ = .);
208    PROVIDE (__FIXUP_END__ = .);
209 
210    .sdata : {
211      PROVIDE (_SDA_BASE_ = 32768);
212      *(.sdata .sdata.* .gnu.linkonce.s.*)
213    } > ram
214 
215    .sbss : {
216      __bss_start = .;
217 
218      PROVIDE (__sbss_start = .); PROVIDE (___sbss_start = .);
219      *(.scommon)
220      *(.dynsbss)
221      *(.sbss .sbss.* .gnu.linkonce.sb.*)
222      PROVIDE (__sbss_end = .); PROVIDE (___sbss_end = .);
223    } > ram
224 
225    .sdata2 : {
226      PROVIDE (_SDA2_BASE_ = 32768);
227 
228      *(.sdata2 .sdata2.* .gnu.linkonce.s2.*)
229    } > ram =0
230 
231    .sbss2 : {
232      *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*)
233    } > ram =0
234
235    .bss :
236    {
237      bss.start = .;
238      *(.bss .bss* .gnu.linkonce.b*)
239      . = ALIGN(4);
240      bss.end = .;
241    } > ram
242
243    /* R/W Data */
244    .data ( . ) :
245    {
246      . = ALIGN (4);
247
248      data.start = .;
249
250      *(.data)
251      *(.data1)
252      *(.data.* .gnu.linkonce.d.*)
253      PROVIDE (__SDATA_START__ = .);
254      *(.sdata*)
255      *(.gnu.linkonce.s.*)
256      data.end = .;
257    } > ram
258
259    data.size = data.end - data.start;
260    bss.size = bss.end - bss.start;
261    text.size = text.end - text.start;
262
263    PROVIDE(_end = data.end);
264
265    .gzipmalloc : {
266        . = ALIGN (16);
267        _startmalloc = .;
268     } >ram
269
270
271    /*
272     * Interrupt stack setup
273     */
274    IntrStack_start = ALIGN(0x10);
275    . += 0x4000;
276    intrStack = .;
277    PROVIDE(intrStackPtr = intrStack);
278
279
280    clear_end = .;
281
282    WorkAreaBase = .;
283
284    /* Sections for compressed .text and .data         */
285    /* after the .datarom section is an int specifying */
286    /* the length of the following compressed image    */
287    /* Executes once then could get overwritten        */
288    .textrom 0x100000 :
289    {
290        *(.textrom)
291        _endloader = .;
292    } > ram
293
294    .datarom :
295    {
296        _dr_start = .;
297        *(.datarom)
298        _dr_end = .;
299    } > ram
300    dr_len = _dr_end - _dr_start;
301
302    .dpram :
303    {
304      m8260 = .;
305      _m8260 = .;
306      . += (128 * 1024);
307     } > dpram
308
309
310     /* the reset vector is at 0xfff00000 which is */
311     /* located at offset 0x400000 from the base   */
312     /* of flash                                   */
313    .bootrom 0xFFF00000 :
314    {
315      *(.bootrom)
316      _endboot = .;
317    } > flash
318
319
320    .line 0 : { *(.line) }
321    .debug 0 : { *(.debug) }
322    .debug_sfnames 0 : { *(.debug_sfnames) }
323    .debug_srcinfo 0 : { *(.debug_srcinfo) }
324    .debug_pubnames 0 : { *(.debug_pubnames) }
325    .debug_aranges 0 : { *(.debug_aranges) }
326    .debug_aregion 0 : { *(.debug_aregion) }
327    .debug_macinfo 0 : { *(.debug_macinfo) }
328    .stab 0 : { *(.stab) }
329    .stabstr 0 : { *(.stabstr) }
330}
Note: See TracBrowser for help on using the repository browser.