source: rtems/c/src/lib/libbsp/m68k/efi68k/startup/linkcmds @ 85c92574

4.104.114.84.95
Last change on this file since 85c92574 was 85c92574, checked in by Joel Sherrill <joel.sherrill@…>, on May 9, 2002 at 9:37:30 PM

2001-05-09 Joel Sherrill <joel@…>

  • startup/linkcmds: In support of gcc 3.1, added one of more of the sections .jcr, .rodata*, .data.*, .gnu.linkonce.s2.*, .gnu.linkonce.sb2.*, and .gnu.linkonce.s.*. Spacing corrections and direction of segments to memory regions may also have been addressed. This was a sweep across all BSPs.
  • Property mode set to 100644
File size: 5.2 KB
Line 
1/*  linkcmds
2 *
3 *  $Id$
4 */
5
6OUTPUT_ARCH(m68k)
7__DYNAMIC  =  0;
8
9/*
10 * The memory map looks like this:
11 * +--------------------+ <- low memory
12 * | .text              |
13 * |        etext       |
14 * |        ctor list   | the ctor and dtor lists are for
15 * |        dtor list   | C++ support
16 * |        _endtext    |
17 * +--------------------+
18 * | .data              | initialized data goes here
19 * |        _sdata      |
20 * |        _edata      |
21 * +--------------------+
22 * | .bss               |
23 * |        _clear_start| start of bss, cleared by crt0
24 * |        _end        | start of heap, used by sbrk()
25 * +--------------------+
26 * |    heap space      |
27 * |        _ENDHEAP    |
28 * |    stack space     |
29 * |        __stack     | top of stack
30 * +--------------------+ <- high memory
31 */
32
33
34/*
35 * User modifiable values:
36 *
37 * _VBR                 location of VBR table
38 */
39
40MEMORY
41{
42  ram     : ORIGIN = 0x203000, LENGTH = 256K
43}
44
45_VBR = 0x200000;                /* location of the VBR table (in RAM) */
46__end_of_ram = 0x240000;
47_copy_data_from_rom = 0;
48
49/*
50 * Declare some sizes.
51 */
52_RamBase = DEFINED(_RamBase) ? _RamBase : 0x200000;
53_RamSize = DEFINED(_RamSize) ? _RamSize : 256K;
54_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
55_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
56
57/*
58 * stick everything in ram (of course)
59 */
60
61SECTIONS
62{
63        ram : {
64                . = .;
65        } >ram
66
67        /*
68         * Text, data and bss segments
69         */
70        .text : {
71                *(.text)
72
73                /*
74                 * C++ constructors/destructors
75                 */
76                *(.gnu.linkonce.t.*)
77
78                /*
79                 * Initialization and finalization code.
80                 *
81                 * Various files can provide initialization and finalization
82                 * functions.  crtbegin.o and crtend.o are two instances. The
83                 * body of these functions are in .init and .fini sections. We
84                 * accumulate the bodies here, and prepend function prologues
85                 * from crti.o and function epilogues from crtn.o. crti.o must
86                 * be linked first; crtn.o must be linked last.  Because these
87                 * are wildcards, it doesn't matter if the user does not
88                 * actually link against crti.o and crtn.o; the linker won't
89                 * look for a file to match a wildcard.  The wildcard also
90                 * means that it doesn't matter which directory crti.o and
91                 * crtn.o are in.
92                 */
93                PROVIDE (_init = .);
94                *crti.o(.init)
95                *(.init)
96                *crtn.o(.init)
97                PROVIDE (_fini = .);
98                *crti.o(.fini)
99                *(.fini)
100                *crtn.o(.fini)
101
102                /*
103                 * C++ constructors/destructors
104                 *
105                 * gcc uses crtbegin.o to find the start of the constructors
106                 * and destructors so we make sure it is first.  Because this
107                 * is a wildcard, it doesn't matter if the user does not
108                 * actually link against crtbegin.o; the linker won't look for
109                 * a file to match a wildcard.  The wildcard also means that
110                 * it doesn't matter which directory crtbegin.o is in. The
111                 * constructor and destructor list are terminated in
112                 * crtend.o.  The same comments apply to it.
113                 */
114                . = ALIGN (16);
115                *crtbegin.o(.ctors)
116                *(.ctors)
117                *crtend.o(.ctors)
118                *crtbegin.o(.dtors)
119                *(.dtors)
120                *crtend.o(.dtors)
121
122                /*
123                 * Exception frame info
124                 */
125                . = ALIGN (16);
126                *(.eh_frame)
127
128                /*
129                 * Read-only data
130                 */
131                . = ALIGN (16);
132                _rodata_start = . ;
133                *(.rodata*)
134                *(.gnu.linkonce.r*)
135
136                 . = ALIGN (16);
137                PROVIDE (_etext = .);
138        } >ram
139        .data : {
140                PROVIDE (_copy_start = .);
141                *(.data)
142                *(.gnu.linkonce.d*)
143                *(.gcc_except_table)
144                *(.jcr)
145                . = ALIGN (16);
146                PROVIDE (_edata = .);
147                PROVIDE (_copy_end = .);
148        } >ram
149        .bss : {
150                _clear_start = .;
151                *(.bss)
152                *(COMMON)
153                . = ALIGN (16);
154                PROVIDE (end = .);
155
156                . += _StackSize;
157                . = ALIGN (16);
158                _stack_init = .;
159                _clear_end = .;
160
161                _WorkspaceBase = .;
162        } >ram
163
164  /* Stabs debugging sections.  */
165  .stab 0 : { *(.stab) }
166  .stabstr 0 : { *(.stabstr) }
167  .stab.excl 0 : { *(.stab.excl) }
168  .stab.exclstr 0 : { *(.stab.exclstr) }
169  .stab.index 0 : { *(.stab.index) }
170  .stab.indexstr 0 : { *(.stab.indexstr) }
171  .comment 0 : { *(.comment) }
172
173  /* DWARF debug sections.
174     Symbols in the DWARF debugging sections are relative to the beginning
175     of the section so we begin them at 0.  */
176  /* DWARF 1 */
177  .debug          0 : { *(.debug) }
178  .line           0 : { *(.line) }
179 
180  /* GNU DWARF 1 extensions */
181  .debug_srcinfo  0 : { *(.debug_srcinfo) }
182  .debug_sfnames  0 : { *(.debug_sfnames) }
183 
184  /* DWARF 1.1 and DWARF 2 */
185  .debug_aranges  0 : { *(.debug_aranges) }
186  .debug_pubnames 0 : { *(.debug_pubnames) }
187 
188  /* DWARF 2 */
189  .debug_info     0 : { *(.debug_info) }
190  .debug_abbrev   0 : { *(.debug_abbrev) }
191  .debug_line     0 : { *(.debug_line) }
192  .debug_frame    0 : { *(.debug_frame) }
193  .debug_str      0 : { *(.debug_str) }
194  .debug_loc      0 : { *(.debug_loc) }
195  .debug_macinfo  0 : { *(.debug_macinfo) }
196 
197  /* SGI/MIPS DWARF 2 extensions */
198  .debug_weaknames 0 : { *(.debug_weaknames) }
199  .debug_funcnames 0 : { *(.debug_funcnames) }
200  .debug_typenames 0 : { *(.debug_typenames) }
201  .debug_varnames  0 : { *(.debug_varnames) }
202  /* These must appear regardless of  .  */
203}
Note: See TracBrowser for help on using the repository browser.