source: rtems/c/src/lib/libbsp/powerpc/mvme5500/startup/linkcmds @ 7be6ad9

4.104.114.84.95
Last change on this file since 7be6ad9 was 7be6ad9, checked in by Eric Norum <WENorum@…>, on 10/20/04 at 15:21:05

Add MVME550 BSP

  • Property mode set to 100644
File size: 9.3 KB
Line 
1OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc",
2              "elf32-powerpc")
3OUTPUT_ARCH(powerpc)
4ENTRY(_start)
5/* Do we need any of these for elf?
6   __DYNAMIC = 0;    */
7PROVIDE (__stack = 0);
8
9
10MEMORY {
11        BOTTOM  : ORIGIN = 0, LENGTH = 0x100
12        VECTORS : ORIGIN = 0x100 ,  LENGTH = 0x3000-0x100
13        CODE : ORIGIN = 0x3000 , LENGTH = 0x400000
14}
15SECTIONS
16{
17  /* discard the 'shared/vector.S' entry point section */
18  /DISCARD/ :
19  {
20        *(.entry_point_section)
21  }
22
23
24  .vectors :
25  {
26        /* should be the first thing... */
27        *(.mvme5500_preloader_section)
28
29   /*
30    * This section is used only if NO_DYNAMIC_EXCEPTION_VECTOR_INSTALL
31    * is defined in vectors/vectors.S
32    *  *(.vectors)
33    * We actually RELY on dynamic vector installation since we need
34    * this space for the preloader...
35    */
36  } > VECTORS
37
38
39  /* START OF THE LOADED IMAGE (parts moved by the preloader) */
40  .image_start :
41  {
42        __rtems_start = ABSOLUTE(.);
43  } > CODE
44
45  /* Read-only sections, merged into text segment: */
46  .interp   : { *(.interp) }    > CODE
47  .hash           : { *(.hash)          }       > CODE
48  .dynsym         : { *(.dynsym)                }       > CODE
49  .dynstr         : { *(.dynstr)                }       > CODE
50  .gnu.version   : { *(.gnu.version)      }     > CODE
51  .gnu.version_d   : { *(.gnu.version_d)  }     > CODE
52  .gnu.version_r   : { *(.gnu.version_r)  }     > CODE
53  .rela.text     :
54    { *(.rela.text) *(.rela.gnu.linkonce.t*) }  > CODE
55  .rela.data     :
56    { *(.rela.data) *(.rela.gnu.linkonce.d*) }  > CODE
57  .rela.rodata   :
58    { *(.rela.rodata) *(.rela.gnu.linkonce.r*) }        > CODE
59  .rela.got       : { *(.rela.got)      }       > CODE
60  .rela.got1      : { *(.rela.got1)     }       > CODE
61  .rela.got2      : { *(.rela.got2)     }       > CODE
62  .rela.ctors     : { *(.rela.ctors)    }       > CODE
63  .rela.dtors     : { *(.rela.dtors)    }       > CODE
64  .rela.init      : { *(.rela.init)     }       > CODE
65  .rela.fini      : { *(.rela.fini)     }       > CODE
66  .rela.bss       : { *(.rela.bss)      }       > CODE
67  .rela.plt       : { *(.rela.plt)      }       > CODE
68  .rela.sdata     : { *(.rela.sdata)    }       > CODE
69  .rela.sbss      : { *(.rela.sbss)     }       > CODE
70  .rela.sdata2    : { *(.rela.sdata2)   }       > CODE
71  .rela.sbss2     : { *(.rela.sbss2)    }       > CODE
72
73  .init                   : { *(.init)                  } >CODE
74
75  .text      : 
76  {
77    *(.text)   
78 
79    /*
80     * Special FreeBSD sysctl sections.
81     */
82    . = ALIGN (16);
83    __start_set_sysctl_set = .;
84    *(set_sysctl_*);
85    __stop_set_sysctl_set = ABSOLUTE(.);
86    *(set_domain_*);
87    *(set_pseudo_*);
88 
89   /* .gnu.warning sections are handled specially by elf32.em.  */
90    *(.gnu.warning)
91    *(.gnu.linkonce.t*)
92  }  > CODE
93
94  .fini                   : { _fini = .; *(.fini)       } >CODE
95  .rodata         : { *(.rodata*) *(.gnu.linkonce.r*) } > CODE
96  .rodata1        : { *(.rodata1) }     > CODE
97_SDA2_BASE_ = __SDATA2_START__ + 0x8000;
98  .sdata2         : { *(.sdata2) *(.gnu.linkonce.s2.*)  }       > CODE
99  .sbss2          : {
100                                PROVIDE (__sbss2_start = .);
101                                          *(.sbss2) *(.gnu.linkonce.sb2.*)
102                                PROVIDE (__sbss2_end = .);
103                                        }       > CODE
104  .eh_frame           : { *.(eh_frame)          } >CODE
105  _etext = .;
106  PROVIDE (etext = .);
107  /* Adjust the address for the data segment.  We want to adjust up to
108     the same address within the page on the next page up.  It would
109     be more correct to do this:
110       . = ALIGN(0x40000) + (ALIGN(8) & (0x40000 - 1));
111     The current expression does not correctly handle the case of a
112     text segment ending precisely at the end of a page; it causes the
113     data segment to skip a page.  The above expression does not have
114     this problem, but it will currently (2/95) cause BFD to allocate
115     a single segment, combining both text and data, for this case.
116     This will prevent the text segment from being shared among
117     multiple executions of the program; I think that is more
118     important than losing a page of the virtual address space (note
119     that no actual memory is lost; the page which is skipped can not
120     be referenced).  */
121 .data  ALIGN(0x1000)  :
122  {
123        PROVIDE(__DATA_START__ = ABSOLUTE(.) );
124    *(.data)
125    *(.gnu.linkonce.d*)
126    CONSTRUCTORS
127  } > CODE
128  .data1   : { *(.data1) }      > CODE
129  PROVIDE (__EXCEPT_START__ = .);
130  .gcc_except_table   : { *(.gcc_except_table) } > CODE
131  PROVIDE (__EXCEPT_END__ = .);
132  .got1           : { *(.got1) }        > CODE
133  .dynamic        : { *(.dynamic) }     > CODE
134  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
135     get relocated with -mrelocatable. Also put in the .fixup pointers.
136     The current compiler no longer needs this, but keep it around for 2.7.2  */
137                PROVIDE (_GOT2_START_ = .);
138  .got2           :  { *(.got2) }       > CODE
139/*
140                PROVIDE (__CTOR_LIST__ = .);
141  .ctors          : { *(.ctors) }       > CODE
142                PROVIDE (__CTOR_END__ = .);
143*/
144  .ctors :
145  {
146    KEEP(*crtbegin.o(.ctors))
147    KEEP(*(EXCLUDE_FILE(*crtend.o) .ctors))
148    KEEP(*(SORT(.ctors.*)))
149    KEEP(*(.ctors))
150  } > CODE
151  .dtors :
152  {
153    KEEP(*crtbegin.o(.dtors))
154    KEEP(*(EXCLUDE_FILE(*crtend.o) .dtors))
155    KEEP(*(SORT(.dtors.*)))
156    KEEP(*(.dtors))
157  } > CODE
158/*
159                PROVIDE (__DTOR_LIST__ = .);
160  .dtors          : { *(.dtors) }       > CODE
161                PROVIDE (__DTOR_END__ = .);
162*/
163                PROVIDE (_FIXUP_START_ = .);
164  .fixup          : { *(.fixup) }       > CODE
165                PROVIDE (_FIXUP_END_ = .);
166                PROVIDE (_GOT2_END_ = .);
167                PROVIDE (_GOT_START_ = .);
168  .got            : { *(.got) } > CODE
169  .got.plt        : { *(.got.plt) }     > CODE
170                PROVIDE (_GOT_END_ = .);
171
172  .jcr            : { KEEP (*(.jcr)) } > CODE
173
174  /* We want the small data sections together, so single-instruction offsets
175     can access them all, and initialized data all before uninitialized, so
176     we can shorten the on-disk segment size.  */
177_SDA_BASE_ = __SDATA_START__ + 0x8000;
178  .sdata          : { *(.sdata) *(.gnu.linkonce.s.*) }  > CODE
179  _edata  =  .;
180  PROVIDE (edata = .);
181/* END OF THE LOADED IMAGE (parts moved by the preloader) */
182/* BELOW THIS POINT, NO LOADABLE ITEMS MUST APPEAR */
183  .sbss      :
184  {
185    PROVIDE (__sbss_start = ABSOLUTE(.));
186    *(.sbss)
187    *(.scommon)
188    *(.dynsbss)
189    PROVIDE (__sbss_end = ABSOLUTE(.));
190  } > CODE
191  .plt   : { *(.plt) }  > CODE
192  .bss       :
193  {
194   PROVIDE (__bss_start = ABSOLUTE(.));
195   *(.dynbss)
196   *(.bss)
197   *(COMMON)
198  . = ALIGN(16);
199  } > CODE
200  /* proper alignment for SYSV stack
201   * (init stack is allocated just after __rtems_end
202   */
203  . = ALIGN(16);
204  _end = . ;
205  __rtems_end = . ;
206  PROVIDE (end = .);
207  /DISCARD/ :
208  {
209    *(.comment)
210  }
211
212
213  /* Stabs debugging sections.  */
214  .stab 0 : { *(.stab) }
215  .stabstr 0 : { *(.stabstr) }
216  .stab.excl 0 : { *(.stab.excl) }
217  .stab.exclstr 0 : { *(.stab.exclstr) }
218  .stab.index 0 : { *(.stab.index) }
219  .stab.indexstr 0 : { *(.stab.indexstr) }
220  .comment 0 : { *(.comment) }
221
222  /* DWARF debug sections.
223     Symbols in the DWARF debugging sections are relative to the beginning
224     of the section so we begin them at 0.  */
225  /* DWARF 1 */
226  .debug          0 : { *(.debug) }
227  .line           0 : { *(.line) }
228 
229  /* GNU DWARF 1 extensions */
230  .debug_srcinfo  0 : { *(.debug_srcinfo) }
231  .debug_sfnames  0 : { *(.debug_sfnames) }
232 
233  /* DWARF 1.1 and DWARF 2 */
234  .debug_aranges  0 : { *(.debug_aranges) }
235  .debug_pubnames 0 : { *(.debug_pubnames) }
236 
237  /* DWARF 2 */
238  .debug_info     0 : { *(.debug_info) }
239  .debug_abbrev   0 : { *(.debug_abbrev) }
240  .debug_line     0 : { *(.debug_line) }
241  .debug_frame    0 : { *(.debug_frame) }
242  .debug_str      0 : { *(.debug_str) }
243  .debug_loc      0 : { *(.debug_loc) }
244  .debug_macinfo  0 : { *(.debug_macinfo) }
245 
246  /* SGI/MIPS DWARF 2 extensions */
247  .debug_weaknames 0 : { *(.debug_weaknames) }
248  .debug_funcnames 0 : { *(.debug_funcnames) }
249  .debug_typenames 0 : { *(.debug_typenames) }
250  .debug_varnames  0 : { *(.debug_varnames) }
251  /* These must appear regardless of  .  */
252}
253
254/* "Conditional linking" is not supported, unfortunately.
255 * This BSP supports getting a network configuration
256 * from NVRAM settings. Hence, the startup code must
257 * access the 'rtems_bsdnet_config' structure.
258 * However, that symbol (and a couple of other networking
259 * related symbols) should only be referenced if the application
260 * actually does networking - otherwise a lot of
261 * code would pulled in from the libnetworking.a under
262 * all circumstances.
263 *
264 * bspstart.c uses these alias names and determines
265 * at runtime if they are void or valid (by comparing
266 * against the NULL address).
267 *
268 * Unfortunately, it is not possible to conditionally
269 * declare a symbol 'EXTERN' - hence we must rely on
270 * other code (probably cross-references within
271 * libnetworking itself) causing a reference to the
272 * 'real' symbols...
273 */
274
275__BSP_wrap_rtems_bsdnet_bootp_boot_file_name =
276        DEFINED(rtems_bsdnet_bootp_boot_file_name) ?
277                rtems_bsdnet_bootp_boot_file_name
278                : 0 ;
279__BSP_wrap_rtems_bsdnet_bootp_cmdline =
280        DEFINED(rtems_bsdnet_bootp_cmdline) ?
281                rtems_bsdnet_bootp_cmdline
282                : 0 ;
283__BSP_wrap_rtems_bsdnet_bootp_server_address =
284        DEFINED(rtems_bsdnet_bootp_server_address) ?
285                rtems_bsdnet_bootp_server_address
286                : 0 ;
287__BSP_wrap_rtems_bsdnet_config =
288        DEFINED(rtems_bsdnet_config) ?
289                rtems_bsdnet_config
290                : 0 ;
291__BSP_wrap_rtems_bsdnet_do_bootp =
292        DEFINED(rtems_bsdnet_do_bootp) ?
293                rtems_bsdnet_do_bootp
294                : 0 ;
295__BSP_wrap_inet_pton =
296        DEFINED(inet_pton) ?
297                inet_pton
298                : 0 ;
299__BSP_wrap_rtems_bsdnet_loopattach =
300        DEFINED(rtems_bsdnet_loopattach) ?
301                rtems_bsdnet_loopattach
302                : 0 ;
Note: See TracBrowser for help on using the repository browser.