source: rtems/c/src/lib/libbsp/powerpc/mpc8260ads/startup/linkcmds @ 7b0c547a

4.104.114.84.95
Last change on this file since 7b0c547a was 7b0c547a, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 20, 2003 at 7:53:27 PM

2003-01-20 Joel Sherrill <joel@…>

  • startup/linkcmds: Add FreeBSD SYSCTL() sections for networking.
  • Property mode set to 100644
File size: 6.6 KB
Line 
1/*
2 *  This file contains directives for the GNU linker which are specific
3 *  to the MPC8260ADS Board
4 *
5 *  $Id$
6 */
7
8OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
9              "elf32-powerpc")
10OUTPUT_ARCH(powerpc)
11 SEARCH_DIR(/usr/local/rtems/powerpc-rtems/lib);
12 
13ENTRY(start)
14
15/*
16 * Declare some sizes.
17 * XXX: The assignment of ". += XyzSize;" fails in older gld's if the
18 *      number used there is not constant.  If this happens to you, edit
19 *      the lines marked XXX below to use a constant value.
20 */
21HeapSize = DEFINED(HeapSize) ? HeapSize : 0x400000; /* 4M Heap */
22StackSize = DEFINED(StackSize) ? StackSize : 0x8000;
23WorkSpaceSize = DEFINED(WorkSpaceSize) ? WorkSpaceSize : 0x80000; /* 512k */
24RamDiskSize = DEFINED(RamDiskSize) ? RamDiskSize : 0x0800000; /* 8M ram disk */
25 
26MEMORY
27        {
28        ram : org = 0x0, l = 16M
29        dpram : org = 0x04700000, l = 128K
30        flash : org = 0xff800000, l = 8M
31        }
32
33
34SECTIONS
35{
36
37    /*
38     * The stack will live in this area - between the vectors and
39     * the text section.
40     */
41       
42    .text 0x10000:
43    {
44    _textbase = .;
45
46
47    text.start = .;
48
49    /* Entry point is the .entry section */
50    *(.entry)
51    *(.entry2)
52
53    /* Actual Code */
54    *(.text)
55    *(.text.*)
56
57
58    *(.rodata*)
59    *(.rodata1)
60
61
62    /*
63     * Special FreeBSD sysctl sections.
64     */
65    . = ALIGN (16);
66    __start_set_sysctl_set = .;
67    *(set_sysctl_*);
68    __stop_set_sysctl_set = ABSOLUTE(.);
69    *(set_domain_*);
70    *(set_pseudo_*);
71
72    /* C++ constructors/destructors */
73    *(.gnu.linkonce.t*)
74
75    /*  Initialization and finalization code.
76     *
77     *  Various files can provide initialization and finalization functions.
78     *  The bodies of these functions are in .init and .fini sections. We
79     *  accumulate the bodies here, and prepend function prologues from
80     *  ecrti.o and function epilogues from ecrtn.o. ecrti.o must be linked
81     *  first; ecrtn.o must be linked last. Because these are wildcards, it
82     *  doesn't matter if the user does not actually link against ecrti.o and
83     *  ecrtn.o; the linker won't look for a file to match a wildcard.  The
84     *  wildcard also means that it doesn't matter which directory ecrti.o
85     *  and ecrtn.o are in.
86     */
87    PROVIDE (_init = .);
88    *ecrti.o(.init)
89    *(.init)
90    *ecrtn.o(.init)
91   
92    PROVIDE (_fini = .);
93    *ecrti.o(.fini)
94    *(.fini)
95    *ecrtn.o(.init)
96
97    /*
98     *  C++ constructors and destructors for static objects.
99     *  PowerPC EABI does not use crtstuff yet, so we build "old-style"
100     *  constructor and destructor lists that begin with the list lenght
101     *  end terminate with a NULL entry.
102     */
103     
104    PROVIDE (__CTOR_LIST__ = .);             
105    /* LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) */
106    *crtbegin.o(.ctors)
107    *(.ctors)
108    *crtend.o(.ctors)
109    LONG(0)
110    PROVIDE (__CTOR_END__ = .);
111       
112    PROVIDE (__DTOR_LIST__ = .);
113    /* LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) */
114    *crtbegin.o(.dtors)
115    *(.dtors)
116    *crtend.o(.dtors)
117    LONG(0)
118    PROVIDE (__DTOR_END__ = .);
119       
120    /* Exception frame info */
121    *(.eh_frame)
122
123    /* Miscellaneous read-only data */
124    _rodata_start = . ;
125    *(.gnu.linkonce.r*)
126    *(.lit)
127    *(.shdata)
128    *(.rodata)
129    *(.rodata1)
130    *(.descriptors)
131    *(rom_ver)
132    _erodata = .;
133
134
135    /* Various possible names for the end of the .text section */
136    etext = ALIGN(0x10);
137    _etext = .;
138    _endtext = .;
139    text.end = .;
140    PROVIDE (etext = .);
141    PROVIDE (__etext = .);
142 
143    } > ram
144
145       
146    PROVIDE (__EXCEPT_START__ = .);
147    .gcc_except_table   : { *(.gcc_except_table) } >RAM
148    PROVIDE (__EXCEPT_END__ = .);
149    __GOT_START__ = .;
150    .got :
151    {
152      s.got = .;
153      *(.got.plt) *(.got)
154    } > ram
155    __GOT_END__ = .;
156       
157    .got1                 : { *(.got1)          } >ram
158    PROVIDE (__GOT2_START__ = .);
159    PROVIDE (_GOT2_START_ = .);
160    .got2                 :  { *(.got2)         } >ram
161    PROVIDE (__GOT2_END__ = .);
162    PROVIDE (_GOT2_END_ = .);
163       
164    PROVIDE (__FIXUP_START__ = .);
165    PROVIDE (_FIXUP_START_ = .);
166    .fixup        : { *(.fixup)         } >ram
167    PROVIDE (_FIXUP_END_ = .);
168    PROVIDE (__FIXUP_END__ = .);
169         
170    PROVIDE (__SDATA2_START__ = .);
171  .sdata2         : { *(.sdata2) *(.gnu.linkonce.s2.*)  } >ram
172  .sbss2          : { *(.sbss2) *(.gnu.linkonce.sb2.*)  } >ram
173    PROVIDE (__SBSS2_END__ = .);
174       
175    .sbss2        : { *(.sbss2)         } >ram
176    PROVIDE (__SBSS2_END__ = .);
177       
178    __SBSS_START__ = .;
179    .bss :
180    {
181      bss.start = .;
182      *(.bss) *(.sbss) *(COMMON)
183      . = ALIGN(4);
184      bss.end = .;
185    } > ram
186    __SBSS_END__ = .;
187
188
189
190
191
192    /* R/W Data */
193    .data ( . ) :
194    {
195      . = ALIGN (4);
196
197      data.start = .;
198
199      *(.data)
200      *(.data1)
201      *(.gnu.linkonce.d.*)
202      PROVIDE (__SDATA_START__ = .);
203      *(.sdata)
204      *(.gnu.linkonce.s.*)
205      data.end = .;
206    } > ram
207
208    data.size = data.end - data.start;
209    bss.size = bss.end - bss.start;
210    text.size = text.end - text.start;
211
212    PROVIDE(_end = data.end);
213
214    .gzipmalloc : {
215        . = ALIGN (16);
216        _startmalloc = .;
217     } >ram
218               
219
220    /*
221     * Interrupt stack setup
222     */
223    IntrStack_start = ALIGN(0x10);
224    . += 0x4000;
225    intrStack = .;
226    PROVIDE(intrStackPtr = intrStack);
227
228
229    _HeapStart = .;
230    __HeapStart = .;
231    . += HeapSize;
232    _HeapEnd = .;
233    __HeapEnd = .;
234
235    clear_end = .;
236
237
238    _WorkspaceBase = .;
239    __WorkspaceBase = .;
240    . += WorkSpaceSize;
241
242
243    _RamDiskBase = .;
244    __RamDiskBase = .;
245    . += RamDiskSize;
246    _RamDiskEnd  = .;
247    __RamDiskEnd = .;
248    PROVIDE( _RamDiskSize = _RamDiskEnd - _RamDiskBase );
249
250    /* Sections for compressed .text and .data         */
251    /* after the .datarom section is an int specifying */
252    /* the length of the following compressed image    */
253    /* Executes once then could get overwritten        */
254    .textrom 0x100000 :
255    {
256        *(.textrom)
257        _endloader = .;
258    } > ram
259
260    .datarom :
261    {
262        _dr_start = .;
263        *(.datarom)
264        _dr_end = .;
265    } > ram
266    dr_len = _dr_end - _dr_start;
267
268    .dpram :
269    {
270      m8260 = .;
271      _m8260 = .;
272      . += (128 * 1024);
273     } > dpram
274
275
276     /* the reset vector is at 0xfff00000 which is */
277     /* located at offset 0x400000 from the base   */
278     /* of flash                                   */
279    .bootrom 0xFFF00000 :
280    {
281      *(.bootrom)
282      _endboot = .;
283    } > flash
284
285
286    .line 0 : { *(.line) }
287    .debug 0 : { *(.debug) }
288    .debug_sfnames 0 : { *(.debug_sfnames) }
289    .debug_srcinfo 0 : { *(.debug_srcinfo) }
290    .debug_pubnames 0 : { *(.debug_pubnames) }
291    .debug_aranges 0 : { *(.debug_aranges) }
292    .debug_aregion 0 : { *(.debug_aregion) }
293    .debug_macinfo 0 : { *(.debug_macinfo) }
294    .stab 0 : { *(.stab) }
295    .stabstr 0 : { *(.stabstr) }
296}
Note: See TracBrowser for help on using the repository browser.