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

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

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

  • Property mode set to 100644
File size: 5.2 KB
Line 
1/*
2 *  This file contains directives for the GNU linker which are specific
3 *  to the Generic MC68302 board.
4 *
5 *  COPYRIGHT (c) 1989-2007.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.org/license/LICENSE.
11 */
12
13MEMORY
14{
15        ram : org = 0x0000, l = 16M
16}
17
18m302 = 0xf7f000;
19_VBR = 0x000000;                /* location of the VBR table (in RAM) */
20
21/*
22 * Declare some sizes.
23 */
24RamBase = DEFINED(RamBase) ? RamBase : 0x0;
25RamSize = DEFINED(RamSize) ? RamSize : 16M;
26HeapSize = DEFINED(HeapSize) ? HeapSize : 0x0;
27_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
28
29SECTIONS
30{
31        ram : {
32                . = 0xc00000;
33        } >ram
34
35        /*
36         * Text, data and bss segments
37         */
38        .text : {
39                *(.text*)
40
41                /*
42                 * C++ constructors/destructors
43                 */
44                *(.gnu.linkonce.t.*)
45
46                /*
47                 * Initialization and finalization code.
48                 *
49                 * Various files can provide initialization and finalization
50                 * functions.  crtbegin.o and crtend.o are two instances. The
51                 * body of these functions are in .init and .fini sections. We
52                 * accumulate the bodies here, and prepend function prologues
53                 * from crti.o and function epilogues from crtn.o. crti.o must
54                 * be linked first; crtn.o must be linked last.  Because these
55                 * are wildcards, it doesn't matter if the user does not
56                 * actually link against crti.o and crtn.o; the linker won't
57                 * look for a file to match a wildcard.  The wildcard also
58                 * means that it doesn't matter which directory crti.o and
59                 * crtn.o are in.
60                 */
61                PROVIDE (_init = .);
62                *crti.o(.init)
63                *(.init)
64                *crtn.o(.init)
65                PROVIDE (_fini = .);
66                *crti.o(.fini)
67                *(.fini)
68                *crtn.o(.fini)
69
70                /*
71                 * Special FreeBSD sysctl sections.
72                 */
73                . = ALIGN (16);
74                __start_set_sysctl_set = .;
75                *(set_sysctl_*);
76                __stop_set_sysctl_set = ABSOLUTE(.);
77                *(set_domain_*);
78                *(set_pseudo_*);
79
80                /*
81                 * C++ constructors/destructors
82                 *
83                 * gcc uses crtbegin.o to find the start of the constructors
84                 * and destructors so we make sure it is first.  Because this
85                 * is a wildcard, it doesn't matter if the user does not
86                 * actually link against crtbegin.o; the linker won't look for
87                 * a file to match a wildcard.  The wildcard also means that
88                 * it doesn't matter which directory crtbegin.o is in. The
89                 * constructor and destructor list are terminated in
90                 * crtend.o.  The same comments apply to it.
91                 */
92                . = ALIGN (16);
93                *crtbegin.o(.ctors)
94                *(.ctors)
95                *crtend.o(.ctors)
96                *crtbegin.o(.dtors)
97                *(.dtors)
98                *crtend.o(.dtors)
99
100                /*
101                 * Exception frame info
102                 */
103                . = ALIGN (16);
104                *(.eh_frame)
105
106                /*
107                 * Read-only data
108                 */
109                . = ALIGN (16);
110                _rodata_start = . ;
111                *(.rodata*)
112                *(.gnu.linkonce.r*)
113
114                 . = ALIGN (16);
115                PROVIDE (_etext = .);
116        } >ram
117
118        .tdata : {
119                _TLS_Data_begin = .;
120                *(.tdata .tdata.* .gnu.linkonce.td.*)
121                _TLS_Data_end = .;
122        } >ram
123
124        .tbss : {
125                _TLS_BSS_begin = .;
126                *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon)
127                _TLS_BSS_end = .;
128        } >ram
129
130        _TLS_Data_size = _TLS_Data_end - _TLS_Data_begin;
131        _TLS_BSS_size = _TLS_BSS_end - _TLS_BSS_begin;
132        _TLS_Size = _TLS_BSS_end - _TLS_Data_begin;
133        _TLS_Alignment = ALIGNOF (.tdata);
134
135        .data : {
136                PROVIDE (_copy_start = .);
137                *(.data*)
138                *(.gnu.linkonce.d*)
139                *(.gcc_except_table*)
140                *(.jcr)
141                . = ALIGN (16);
142                PROVIDE (_edata = .);
143                PROVIDE (_copy_end = .);
144        } >ram
145        .bss : {
146                _clear_start = .;
147                *(.dynbss)
148                *(.bss* .gnu.linkonce.b.*)
149                *(COMMON)
150                . = ALIGN (16);
151                PROVIDE (end = .);
152
153                . += _StackSize;
154                . = ALIGN (16);
155                _stack_init = .;
156                _clear_end = .;
157
158                WorkAreaBase = .;
159        } >ram
160
161  /* Stabs debugging sections.  */
162  .stab 0 : { *(.stab) }
163  .stabstr 0 : { *(.stabstr) }
164  .stab.excl 0 : { *(.stab.excl) }
165  .stab.exclstr 0 : { *(.stab.exclstr) }
166  .stab.index 0 : { *(.stab.index) }
167  .stab.indexstr 0 : { *(.stab.indexstr) }
168  .comment 0 : { *(.comment) }
169
170  /* DWARF debug sections.
171     Symbols in the DWARF debugging sections are relative to the beginning
172     of the section so we begin them at 0.  */
173  /* DWARF 1 */
174  .debug          0 : { *(.debug) }
175  .line           0 : { *(.line) }
176 
177  /* GNU DWARF 1 extensions */
178  .debug_srcinfo  0 : { *(.debug_srcinfo) }
179  .debug_sfnames  0 : { *(.debug_sfnames) }
180 
181  /* DWARF 1.1 and DWARF 2 */
182  .debug_aranges  0 : { *(.debug_aranges) }
183  .debug_pubnames 0 : { *(.debug_pubnames) }
184 
185  /* DWARF 2 */
186  .debug_info     0 : { *(.debug_info) }
187  .debug_abbrev   0 : { *(.debug_abbrev) }
188  .debug_line     0 : { *(.debug_line) }
189  .debug_frame    0 : { *(.debug_frame) }
190  .debug_str      0 : { *(.debug_str) }
191  .debug_loc      0 : { *(.debug_loc) }
192  .debug_macinfo  0 : { *(.debug_macinfo) }
193 
194  /* SGI/MIPS DWARF 2 extensions */
195  .debug_weaknames 0 : { *(.debug_weaknames) }
196  .debug_funcnames 0 : { *(.debug_funcnames) }
197  .debug_typenames 0 : { *(.debug_typenames) }
198  .debug_varnames  0 : { *(.debug_varnames) }
199  /* These must appear regardless of  .  */
200}
Note: See TracBrowser for help on using the repository browser.