source: rtems/c/src/lib/libbsp/m68k/mvme167/startup/linkcmds @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 5.7 KB
Line 
1/*
2 *  This file contains directives for the GNU linker which are specific
3 *  to the Motorola MVME167 board. This linker script produces ELF
4 *  executables.
5 *
6 *  Copyright (c) 1999, National Research Council of Canada.
7 *  Some of this material was copied from binutils-2.9.4 linker scripts,
8 *  and is therefore likely to be copyrighted by the Free Software
9 *  Foundation, even though explicit copyright notices did not appear in
10 *  those files.
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17/* These are not really needed here */
18OUTPUT_FORMAT("elf32-m68k")
19OUTPUT_ARCH(m68k)
20ENTRY(_start)
21
22/*
23 * Declare some sizes. Heap is sized at whatever ram space is left.
24 */
25RamBase = DEFINED(RamBase) ? RamBase : 0x00800000;
26RamSize = DEFINED(RamSize) ? RamSize : 4M;
27HeapSize = DEFINED(HeapSize) ? HeapSize : 0;
28_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
29
30MEMORY
31{
32  /*  The location of RAM is the address space is configurable.
33      This is where we put one board. The base address should be
34      passed as a parameter when building multiprocessor images
35      where each board resides at a different address. */
36  ram  : org = 0x00800000, l = 4M
37  rom  : org = 0xFF800000, l = 4M
38  sram : org = 0xFFE00000, l = 128K
39}
40
41SECTIONS
42{
43 /*
44  * Text, data and bss segments
45  */
46  .text : {
47    *(.text*)
48
49    /*
50     * C++ constructors/destructors
51     */
52    *(.gnu.linkonce.t.*)
53
54    /*
55     * Initialization and finalization code.
56     *
57     * Various files can provide initialization and finalization
58     * functions.  crtbegin.o and crtend.o are two instances. The
59     * body of these functions are in .init and .fini sections. We
60     * accumulate the bodies here, and prepend function prologues
61     * from crti.o and function epilogues from crtn.o. crti.o must
62     * be linked first; crtn.o must be linked last.  Because these
63     * are wildcards, it doesn't matter if the user does not
64     * actually link against crti.o and crtn.o; the linker won't
65     * look for a file to match a wildcard.  The wildcard also
66     * means that it doesn't matter which directory crti.o and
67     * crtn.o are in.
68     */
69    PROVIDE (_init = .);
70    *crti.o(.init)
71    *(.init)
72    *crtn.o(.init)
73   
74    PROVIDE (_fini = .);
75    *crti.o(.fini)
76    *(.fini)
77    *crtn.o(.fini)
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    /*
90     * C++ constructors/destructors
91     *
92     * gcc uses crtbegin.o to find the start of the constructors
93     * and destructors so we make sure it is first.  Because this
94     * is a wildcard, it doesn't matter if the user does not
95     * actually link against crtbegin.o; the linker won't look for
96     * a file to match a wildcard.  The wildcard also means that
97     * it doesn't matter which directory crtbegin.o is in. The
98     * constructor and destructor list are terminated in
99     * crtend.o.  The same comments apply to it.
100     */
101    . = ALIGN (16);
102    *crtbegin.o(.ctors)
103    *(.ctors)
104    *crtend.o(.ctors)
105   
106    *crtbegin.o(.dtors)
107    *(.dtors)
108    *crtend.o(.dtors)
109
110    /*
111     * Exception frame info
112     */
113    . = ALIGN (16);
114    *(.eh_frame)
115
116    /*
117     * Read-only data
118     */
119    . = ALIGN (16);
120    _rodata_start = .;
121    *(.rodata*)
122    *(.gnu.linkonce.r*)
123    PROVIDE(_erodata = . );
124
125    . = ALIGN (16);
126    PROVIDE (_etext = .);
127  } >ram
128
129  .tdata : {
130    _TLS_Data_begin = .;
131    *(.tdata .tdata.* .gnu.linkonce.td.*)
132    _TLS_Data_end = .;
133  } >ram
134
135  .tbss : {
136    _TLS_BSS_begin = .;
137    *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
138    _TLS_BSS_end = .;
139  } >ram
140
141  _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
142  _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
143  _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
144  _TLS_Alignment = ALIGNOF (.tdata);
145 
146  .data : {
147    PROVIDE (_copy_start = .);
148    *(.data*)
149    *(.gnu.linkonce.d*)
150    *(.gcc_except_table*)
151    *(.jcr)
152    . = ALIGN (16);
153    PROVIDE (_edata = .);
154    PROVIDE (_copy_end = .);
155  } >ram
156 
157 .bss : {
158    _clear_start = .;
159    *(.dynbss)
160    *(.bss* .gnu.linkonce.b.*)
161    *(COMMON)
162    . = ALIGN (16);
163    PROVIDE (end = .);
164
165    . += _StackSize;
166    . = ALIGN (16);
167    _stack_init = .;
168    _clear_end = .;
169
170    WorkAreaBase = .;
171  } >ram
172
173  /* Stabs debugging sections.  */
174  .stab 0 : { *(.stab) }
175  .stabstr 0 : { *(.stabstr) }
176  .stab.excl 0 : { *(.stab.excl) }
177  .stab.exclstr 0 : { *(.stab.exclstr) }
178  .stab.index 0 : { *(.stab.index) }
179  .stab.indexstr 0 : { *(.stab.indexstr) }
180  .comment 0 : { *(.comment) }
181 
182  /* DWARF debug sections.
183     Symbols in the DWARF debugging sections are relative to the beginning
184     of the section so we begin them at 0.  */
185  /* DWARF 1 */
186  .debug          0 : { *(.debug) }
187  .line           0 : { *(.line) }
188 
189  /* GNU DWARF 1 extensions */
190  .debug_srcinfo  0 : { *(.debug_srcinfo) }
191  .debug_sfnames  0 : { *(.debug_sfnames) }
192 
193  /* DWARF 1.1 and DWARF 2 */
194  .debug_aranges  0 : { *(.debug_aranges) }
195  .debug_pubnames 0 : { *(.debug_pubnames) }
196 
197  /* DWARF 2 */
198  .debug_info     0 : { *(.debug_info) }
199  .debug_abbrev   0 : { *(.debug_abbrev) }
200  .debug_line     0 : { *(.debug_line) }
201  .debug_frame    0 : { *(.debug_frame) }
202  .debug_str      0 : { *(.debug_str) }
203  .debug_loc      0 : { *(.debug_loc) }
204  .debug_macinfo  0 : { *(.debug_macinfo) }
205 
206  /* SGI/MIPS DWARF 2 extensions */
207  .debug_weaknames 0 : { *(.debug_weaknames) }
208  .debug_funcnames 0 : { *(.debug_funcnames) }
209  .debug_typenames 0 : { *(.debug_typenames) }
210  .debug_varnames  0 : { *(.debug_varnames) }
211  /* These must appear regardless of  .  */
212}
Note: See TracBrowser for help on using the repository browser.