source: rtems/c/src/lib/libbsp/m68k/mvme147/startup/linkcmds @ 960fd85

4.115
Last change on this file since 960fd85 was 960fd85, checked in by Sebastian Huber <sebastian.huber@…>, on 01/28/14 at 10:52:17

bsps: Thread-local storage (TLS) for linkcmds

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