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

4.104.114.84.95
Last change on this file since c1e7b3f was c1e7b3f, checked in by Jennifer Averett <Jennifer.Averett@…>, on 04/15/05 at 17:37:56

2005-04-15 <jennifer.averett@…>

  • startup/linkcmds: add missing section to link cmds
  • 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 .data.* .gnu.linkonce.d*)
125    CONSTRUCTORS
126  } > CODE
127  .data1   : { *(.data1) }      > CODE
128  PROVIDE (__EXCEPT_START__ = .);
129  .gcc_except_table   : { *(.gcc_except_table) } > CODE
130  PROVIDE (__EXCEPT_END__ = .);
131  .got1           : { *(.got1) }        > CODE
132  .dynamic        : { *(.dynamic) }     > CODE
133  /* Put .ctors and .dtors next to the .got2 section, so that the pointers
134     get relocated with -mrelocatable. Also put in the .fixup pointers.
135     The current compiler no longer needs this, but keep it around for 2.7.2  */
136                PROVIDE (_GOT2_START_ = .);
137  .got2           :  { *(.got2) }       > CODE
138/*
139                PROVIDE (__CTOR_LIST__ = .);
140  .ctors          : { *(.ctors) }       > CODE
141                PROVIDE (__CTOR_END__ = .);
142*/
143  .ctors :
144  {
145    KEEP(*crtbegin.o(.ctors))
146    KEEP(*(EXCLUDE_FILE(*crtend.o) .ctors))
147    KEEP(*(SORT(.ctors.*)))
148    KEEP(*(.ctors))
149  } > CODE
150  .dtors :
151  {
152    KEEP(*crtbegin.o(.dtors))
153    KEEP(*(EXCLUDE_FILE(*crtend.o) .dtors))
154    KEEP(*(SORT(.dtors.*)))
155    KEEP(*(.dtors))
156  } > CODE
157/*
158                PROVIDE (__DTOR_LIST__ = .);
159  .dtors          : { *(.dtors) }       > CODE
160                PROVIDE (__DTOR_END__ = .);
161*/
162                PROVIDE (_FIXUP_START_ = .);
163  .fixup          : { *(.fixup) }       > CODE
164                PROVIDE (_FIXUP_END_ = .);
165                PROVIDE (_GOT2_END_ = .);
166                PROVIDE (_GOT_START_ = .);
167  .got            : { *(.got) } > CODE
168  .got.plt        : { *(.got.plt) }     > CODE
169                PROVIDE (_GOT_END_ = .);
170
171  .jcr            : { KEEP (*(.jcr)) } > CODE
172
173  /* We want the small data sections together, so single-instruction offsets
174     can access them all, and initialized data all before uninitialized, so
175     we can shorten the on-disk segment size.  */
176_SDA_BASE_ = __SDATA_START__ + 0x8000;
177  .sdata          : { *(.sdata) *(.gnu.linkonce.s.*) }  > CODE
178  _edata  =  .;
179  PROVIDE (edata = .);
180/* END OF THE LOADED IMAGE (parts moved by the preloader) */
181/* BELOW THIS POINT, NO LOADABLE ITEMS MUST APPEAR */
182  .sbss      :
183  {
184    PROVIDE (__sbss_start = ABSOLUTE(.));
185    *(.sbss)
186    *(.scommon)
187    *(.dynsbss)
188    PROVIDE (__sbss_end = ABSOLUTE(.));
189  } > CODE
190  .plt   : { *(.plt) }  > CODE
191  .bss       :
192  {
193   PROVIDE (__bss_start = ABSOLUTE(.));
194   *(.dynbss)
195   *(.bss)
196   *(COMMON)
197  . = ALIGN(16);
198  } > CODE
199  /* proper alignment for SYSV stack
200   * (init stack is allocated just after __rtems_end
201   */
202  . = ALIGN(16);
203  _end = . ;
204  __rtems_end = . ;
205  PROVIDE (end = .);
206  /DISCARD/ :
207  {
208    *(.comment)
209  }
210
211
212  /* Stabs debugging sections.  */
213  .stab 0 : { *(.stab) }
214  .stabstr 0 : { *(.stabstr) }
215  .stab.excl 0 : { *(.stab.excl) }
216  .stab.exclstr 0 : { *(.stab.exclstr) }
217  .stab.index 0 : { *(.stab.index) }
218  .stab.indexstr 0 : { *(.stab.indexstr) }
219  .comment 0 : { *(.comment) }
220
221  /* DWARF debug sections.
222     Symbols in the DWARF debugging sections are relative to the beginning
223     of the section so we begin them at 0.  */
224  /* DWARF 1 */
225  .debug          0 : { *(.debug) }
226  .line           0 : { *(.line) }
227 
228  /* GNU DWARF 1 extensions */
229  .debug_srcinfo  0 : { *(.debug_srcinfo) }
230  .debug_sfnames  0 : { *(.debug_sfnames) }
231 
232  /* DWARF 1.1 and DWARF 2 */
233  .debug_aranges  0 : { *(.debug_aranges) }
234  .debug_pubnames 0 : { *(.debug_pubnames) }
235 
236  /* DWARF 2 */
237  .debug_info     0 : { *(.debug_info) }
238  .debug_abbrev   0 : { *(.debug_abbrev) }
239  .debug_line     0 : { *(.debug_line) }
240  .debug_frame    0 : { *(.debug_frame) }
241  .debug_str      0 : { *(.debug_str) }
242  .debug_loc      0 : { *(.debug_loc) }
243  .debug_macinfo  0 : { *(.debug_macinfo) }
244 
245  /* SGI/MIPS DWARF 2 extensions */
246  .debug_weaknames 0 : { *(.debug_weaknames) }
247  .debug_funcnames 0 : { *(.debug_funcnames) }
248  .debug_typenames 0 : { *(.debug_typenames) }
249  .debug_varnames  0 : { *(.debug_varnames) }
250  /* These must appear regardless of  .  */
251}
252
253/* "Conditional linking" is not supported, unfortunately.
254 * This BSP supports getting a network configuration
255 * from NVRAM settings. Hence, the startup code must
256 * access the 'rtems_bsdnet_config' structure.
257 * However, that symbol (and a couple of other networking
258 * related symbols) should only be referenced if the application
259 * actually does networking - otherwise a lot of
260 * code would pulled in from the libnetworking.a under
261 * all circumstances.
262 *
263 * bspstart.c uses these alias names and determines
264 * at runtime if they are void or valid (by comparing
265 * against the NULL address).
266 *
267 * Unfortunately, it is not possible to conditionally
268 * declare a symbol 'EXTERN' - hence we must rely on
269 * other code (probably cross-references within
270 * libnetworking itself) causing a reference to the
271 * 'real' symbols...
272 */
273
274__BSP_wrap_rtems_bsdnet_bootp_boot_file_name =
275        DEFINED(rtems_bsdnet_bootp_boot_file_name) ?
276                rtems_bsdnet_bootp_boot_file_name
277                : 0 ;
278__BSP_wrap_rtems_bsdnet_bootp_cmdline =
279        DEFINED(rtems_bsdnet_bootp_cmdline) ?
280                rtems_bsdnet_bootp_cmdline
281                : 0 ;
282__BSP_wrap_rtems_bsdnet_bootp_server_address =
283        DEFINED(rtems_bsdnet_bootp_server_address) ?
284                rtems_bsdnet_bootp_server_address
285                : 0 ;
286__BSP_wrap_rtems_bsdnet_config =
287        DEFINED(rtems_bsdnet_config) ?
288                rtems_bsdnet_config
289                : 0 ;
290__BSP_wrap_rtems_bsdnet_do_bootp =
291        DEFINED(rtems_bsdnet_do_bootp) ?
292                rtems_bsdnet_do_bootp
293                : 0 ;
294__BSP_wrap_inet_pton =
295        DEFINED(inet_pton) ?
296                inet_pton
297                : 0 ;
298__BSP_wrap_rtems_bsdnet_loopattach =
299        DEFINED(rtems_bsdnet_loopattach) ?
300                rtems_bsdnet_loopattach
301                : 0 ;
Note: See TracBrowser for help on using the repository browser.