source: rtems/c/src/lib/libbsp/powerpc/virtex/startup/linkcmds @ 15b81bb

4.104.114.84.95
Last change on this file since 15b81bb was ab66cf0d, checked in by Thomas Doerfler <Thomas.Doerfler@…>, on 07/27/07 at 06:39:21

removed superfluous bss section

  • Property mode set to 100644
File size: 7.3 KB
Line 
1/*
2 *  This file contains directives for the GNU linker which are specific
3 *  to the virtex
4 *  This file is intended to be used together with dlentry.s
5 *  it will generate downloadable code
6 *
7 *  Modifications for gen405 by Dennis Ehlin
8 *  Modifications for virtex by Keith, Greg, and Bob
9 *
10 *  $Id$
11 */
12
13OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
14              "elf32-powerpc")
15OUTPUT_ARCH(powerpc)
16
17ENTRY(download_entry)
18
19
20_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 8M;
21
22
23MEMORY
24  {
25        RAM : ORIGIN = 0, LENGTH = 16M
26        /*FLASH : ORIGIN = 0xFFE00000, LENGTH = 16M*/
27  }
28SECTIONS
29{
30  .text 0x10000:
31  {
32     text.start = . ;
33     *(.entry)
34     *(.entry2)
35     *(.text*)
36     *(.rodata*)
37     *(.rodata1)
38
39     /*
40      * Special FreeBSD sysctl sections.
41      */
42     . = ALIGN (16);
43     __start_set_sysctl_set = .;
44     *(set_sysctl_*);
45     __stop_set_sysctl_set = ABSOLUTE(.);
46     *(set_domain_*);
47     *(set_pseudo_*);
48
49    /* C++ constructors/destructors */
50    *(.gnu.linkonce.t*)
51
52    /*  Initialization and finalization code.
53     *
54     *  Various files can provide initialization and finalization functions.
55     *  The bodies of these functions are in .init and .fini sections. We
56     *  accumulate the bodies here, and prepend function prologues from
57     *  ecrti.o and function epilogues from ecrtn.o. ecrti.o must be linked
58     *  first; ecrtn.o must be linked last. Because these are wildcards, it
59     *  doesn't matter if the user does not actually link against ecrti.o and
60     *  ecrtn.o; the linker won't look for a file to match a wildcard.  The
61     *  wildcard also means that it doesn't matter which directory ecrti.o
62     *  and ecrtn.o are in.
63     */
64    PROVIDE (_init = .);
65    *ecrti.o(.init)
66    *(.init)
67    *ecrtn.o(.init)
68   
69    PROVIDE (_fini = .);
70    *ecrti.o(.fini)
71    *(.fini)
72    *ecrtn.o(.init)
73
74    /*
75     *  C++ constructors and destructors for static objects.
76     *  PowerPC EABI does not use crtstuff yet, so we build "old-style"
77     *  constructor and destructor lists that begin with the list lenght
78     *  end terminate with a NULL entry.
79     */
80     
81    PROVIDE (__CTOR_LIST__ = .);             
82    *crtbegin.o(.ctors)
83    *(.ctors)
84    *crtend.o(.ctors)
85    LONG(0)
86    PROVIDE (__CTOR_END__ = .);
87       
88    PROVIDE (__DTOR_LIST__ = .);
89    *crtbegin.o(.dtors)
90    *(.dtors)
91    *crtend.o(.dtors)
92    LONG(0)
93    PROVIDE (__DTOR_END__ = .);
94       
95    /* Exception frame info */
96     *(.eh_frame)
97    /* Miscellaneous read-only data */
98    _rodata_start = . ;
99    *(.gnu.linkonce.r*)
100    *(.lit)
101    *(.shdata)
102    *(.rodata)
103    *(.rodata1)
104    *(.descriptors)
105    *(rom_ver)
106    _erodata = .;
107
108    PROVIDE (__EXCEPT_START__ = .);
109    *(.gcc_except_table)
110    PROVIDE (__EXCEPT_END__ = .);
111    __GOT_START__ = .;
112    s.got = .;
113    *(.got.plt)
114    *(.got)
115    *(.got1)
116    PROVIDE (__GOT2_START__ = .);
117    PROVIDE (_GOT2_START_ = .);
118    *(.got2)
119    PROVIDE (__GOT2_END__ = .);
120    PROVIDE (_GOT2_END_ = .);
121   
122    PROVIDE (__FIXUP_START__ = .);
123    PROVIDE (_FIXUP_START_ = .);
124    *(.fixup)
125    PROVIDE (_FIXUP_END_ = .);
126    PROVIDE (__FIXUP_END__ = .);
127   
128
129    /* Various possible names for the end of the .text section */
130     etext = ALIGN(0x10);
131     _etext = .;
132
133     *(.lit)
134     *(.shdata)
135     _endtext = ALIGN(0x10);
136     text.end = .;
137     text.size = text.end - text.start;
138  } >RAM
139
140  text.size = text.end - text.start;
141
142  .jcr : { KEEP (*(.jcr)) } >RAM
143
144    .rel.dyn : {
145      *(.rel.init)
146      *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
147      *(.rel.fini)
148      *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
149      *(.rel.data.rel.ro* .rel.gnu.linkonce.d.rel.ro.*)
150      *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
151      *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
152      *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
153      *(.rel.ctors)
154      *(.rel.dtors)
155      *(.rel.got)
156      *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
157      *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
158      *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
159      *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
160      *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
161    } >RAM
162    .rela.dyn : {
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
182    PROVIDE (__SDATA2_START__ = .);
183  .sdata2         : { *(.sdata2) *(.gnu.linkonce.s2.*)  } >RAM
184  .sbss2          : { *(.sbss2) *(.gnu.linkonce.sb2.*)  } >RAM
185    PROVIDE (__SBSS2_END__ = .);
186       
187    .sbss2        : { *(.sbss2)         } >RAM
188    PROVIDE (__SBSS2_END__ = .);
189       
190    /* R/W Data */
191    .data ( . ) :
192    {
193      . = ALIGN (4);
194
195      data.start = .;
196
197      *(.data)
198      *(.data1)
199      *(.data.* .gnu.linkonce.d.*)
200      PROVIDE (__SDATA_START__ = .);
201      *(.sdata*)
202      *(.gnu.linkonce.s.*)
203      data.end = .;
204      data.size = data.end - data.start;
205    } >RAM
206
207    __SBSS_START__ = .;
208    .bss :
209    {
210      bss.start = .;
211      *(.bss .bss* .gnu.linkonce.b*)
212      *(.sbss*) *(COMMON)
213    bss.end = ALIGN(4);
214    } >RAM
215      bss.size = bss.end - bss.start;
216    __SBSS_END__ = .;
217   
218    PROVIDE(_bss_start   = ADDR(.bss));
219    PROVIDE(_bss_size    = SIZEOF(.bss));
220    PROVIDE(bss.size    = SIZEOF(.bss));
221    PROVIDE(_data_start  = ADDR(.data));
222    PROVIDE(_data_size   = SIZEOF(.data));
223    PROVIDE(_text_start  = ADDR(.text));
224    PROVIDE(_text_size   = SIZEOF(.text));
225    PROVIDE(_end = data.end);
226
227    .gzipmalloc : {
228        . = ALIGN (16);
229        _startmalloc = .;
230     } >RAM
231               
232
233    /*
234     * Interrupt stack setup
235     */
236    IntrStack_start = ALIGN(0x10);
237    . += 0x4000;
238    intrStack = .;
239    PROVIDE(intrStackPtr = intrStack);
240
241    /* Sections for compressed .text and .data         */
242    /* after the .datarom section is an int specifying */
243    /* the length of the following compressed image    */
244    /* Executes once then could get overwritten        */
245    .textrom 0x100000 :
246    {
247        *(.textrom)
248        _endloader = .;
249    } >RAM
250
251    .datarom :
252    {
253        _dr_start = .;
254        *(.datarom)
255        _dr_end = .;
256    } >RAM
257    dr_len = _dr_end - _dr_start;
258
259  /* align bottom of 32k init stack at a 32k boundary */
260  . = . + 0x4000;
261  . = ALIGN( 0x8000 );
262  stack.start = .;
263  . = . + 0x8000;
264  stack.end   = .;
265  /*
266   * Interrupt stack setup
267   */
268  IntrStack_start = ALIGN(0x10);
269  . += 0x4000;
270  intrStack = .;
271  PROVIDE(intrStackPtr = intrStack);
272
273  PROVIDE(_end = intrStack);
274
275    .line 0 : { *(.line) }
276    .debug 0 : { *(.debug) }
277    .debug_sfnames 0 : { *(.debug_sfnames) }
278    .debug_srcinfo 0 : { *(.debug_srcinfo) }
279    .debug_pubnames 0 : { *(.debug_pubnames) }
280    .debug_aranges 0 : { *(.debug_aranges) }
281    .debug_aregion 0 : { *(.debug_aregion) }
282    .debug_macinfo 0 : { *(.debug_macinfo) }
283    .stab 0 : { *(.stab) }
284    .stabstr 0 : { *(.stabstr) }
285}
Note: See TracBrowser for help on using the repository browser.