source: rtems/c/src/lib/libbsp/m68k/ods68302/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 05/09/02 at 21:37:30

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: 4.7 KB
Line 
1/*
2 * $Id$
3 *
4 * MC68302 Linker command file
5 *
6 */
7
8/*
9 * Declare some sizes.
10 */
11_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
12_RamSize = DEFINED(_RamSize) ? _RamSize : 1M;
13_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
14_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
15
16/*
17 * Declare on-board memory.
18 */
19MEMORY {
20          ram : ORIGIN = 0x00000000, LENGTH = 1M
21}
22SECTIONS
23{
24        ram : {
25                . = .;
26        } >ram
27
28        .vtable :
29        {
30                vtable_start = .;
31                *(.vtable)
32                evtable = .;
33        } >ram
34
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                 * C++ constructors/destructors
73                 *
74                 * gcc uses crtbegin.o to find the start of the constructors
75                 * and destructors so we make sure it is first.  Because this
76                 * is a wildcard, it doesn't matter if the user does not
77                 * actually link against crtbegin.o; the linker won't look for
78                 * a file to match a wildcard.  The wildcard also means that
79                 * it doesn't matter which directory crtbegin.o is in. The
80                 * constructor and destructor list are terminated in
81                 * crtend.o.  The same comments apply to it.
82                 */
83                . = ALIGN (16);
84                *crtbegin.o(.ctors)
85                *(.ctors)
86                *crtend.o(.ctors)
87                *crtbegin.o(.dtors)
88                *(.dtors)
89                *crtend.o(.dtors)
90
91                /*
92                 * Exception frame info
93                 */
94                . = ALIGN (16);
95                *(.eh_frame)
96
97                /*
98                 * Read-only data
99                 */
100                . = ALIGN (16);
101                _rodata_start = .;
102                *(.rodata*)
103                *(.gnu.linkonce.r*)
104
105                 . = ALIGN (16);
106                PROVIDE (_etext = .);
107        } >ram
108        .data : {
109                PROVIDE (_copy_start = .);
110                *(.data)
111                *(.gnu.linkonce.d*)
112                *(.gcc_except_table)
113                *(.jcr)
114                . = ALIGN (16);
115                PROVIDE (_edata = .);
116                PROVIDE (_copy_end = .);
117        } >ram
118        .bss : {
119                _clear_start = .;
120                *(.bss)
121                *(COMMON)
122                . = ALIGN (16);
123                PROVIDE (end = .);
124
125                . += _StackSize;
126                . = ALIGN (16);
127                _stack_init = .;
128                _clear_end = .;
129
130                _WorkspaceBase = .;
131        } >ram
132
133  /* Stabs debugging sections.  */
134  .stab 0 : { *(.stab) }
135  .stabstr 0 : { *(.stabstr) }
136  .stab.excl 0 : { *(.stab.excl) }
137  .stab.exclstr 0 : { *(.stab.exclstr) }
138  .stab.index 0 : { *(.stab.index) }
139  .stab.indexstr 0 : { *(.stab.indexstr) }
140  .comment 0 : { *(.comment) }
141
142  /* DWARF debug sections.
143     Symbols in the DWARF debugging sections are relative to the beginning
144     of the section so we begin them at 0.  */
145  /* DWARF 1 */
146  .debug          0 : { *(.debug) }
147  .line           0 : { *(.line) }
148 
149  /* GNU DWARF 1 extensions */
150  .debug_srcinfo  0 : { *(.debug_srcinfo) }
151  .debug_sfnames  0 : { *(.debug_sfnames) }
152 
153  /* DWARF 1.1 and DWARF 2 */
154  .debug_aranges  0 : { *(.debug_aranges) }
155  .debug_pubnames 0 : { *(.debug_pubnames) }
156 
157  /* DWARF 2 */
158  .debug_info     0 : { *(.debug_info) }
159  .debug_abbrev   0 : { *(.debug_abbrev) }
160  .debug_line     0 : { *(.debug_line) }
161  .debug_frame    0 : { *(.debug_frame) }
162  .debug_str      0 : { *(.debug_str) }
163  .debug_loc      0 : { *(.debug_loc) }
164  .debug_macinfo  0 : { *(.debug_macinfo) }
165 
166  /* SGI/MIPS DWARF 2 extensions */
167  .debug_weaknames 0 : { *(.debug_weaknames) }
168  .debug_funcnames 0 : { *(.debug_funcnames) }
169  .debug_typenames 0 : { *(.debug_typenames) }
170  .debug_varnames  0 : { *(.debug_varnames) }
171  /* These must appear regardless of  .  */
172}
173
174RAM_BASE = DEFINED(RAM_BASE) ? RAM_BASE : 0x00000000;
175RAM_SIZE = DEFINED(RAM_SIZE) ? RAM_SIZE : 0x00100000;
176ROM_BASE = DEFINED(ROM_BASE) ? ROM_BASE : 0x00C00000;
177ROM_SIZE = DEFINED(ROM_SIZE) ? ROM_SIZE : 0x00100000;
178MC68302_BASE = DEFINED(MC68302_BASE) ? MC68302_BASE : 0x00700000;
179m302 = MC68302_BASE;
180_VBR = ADDR(.vtable);           /* location of the VBR table (in RAM) */
181
Note: See TracBrowser for help on using the repository browser.