source: rtems/c/src/lib/libbsp/m68k/sim68000/startup/linkcmds @ 4217b96

4.104.114.84.95
Last change on this file since 4217b96 was 4217b96, checked in by Joel Sherrill <joel.sherrill@…>, on 02/08/06 at 12:28:38

2006-02-08 Joel Sherrill <joel@…>

  • startup/linkcmds: Add sections required by newer gcc versions.
  • Property mode set to 100644
File size: 4.8 KB
Line 
1/*
2 * $Id$
3 *
4 * MC68302 Linker command file
5 *
6 */
7
8/*
9 * Declare some sizes.
10 */
11_RomBase = DEFINED(_RomBase) ? _RomBase : 0x0;
12_RomSize = DEFINED(_RomSize) ? _RomSize : 512K;
13_RamBase = DEFINED(_RamBase) ? _RamBase : 0x80000;
14_RamSize = DEFINED(_RamSize) ? _RamSize : 128K;
15_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 32K;
16_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
17
18/*
19 * Declare on-board memory.
20 */
21MEMORY {
22          eprom : ORIGIN = 0x00000000, LENGTH = 512K
23          ram : ORIGIN = 0x00040000, LENGTH = 128K
24}
25SECTIONS
26{
27        ram : {
28                . = .;
29        } >ram
30
31        /*
32         * Text, data and bss segments
33         */
34        .text 0x0 : {
35                *(.text*)
36
37                /*
38                 * C++ constructors/destructors
39                 */
40                *(.gnu.linkonce.t.*)
41
42                /*
43                 * Initialization and finalization code.
44                 *
45                 * Various files can provide initialization and finalization
46                 * functions.  crtbegin.o and crtend.o are two instances. The
47                 * body of these functions are in .init and .fini sections. We
48                 * accumulate the bodies here, and prepend function prologues
49                 * from crti.o and function epilogues from crtn.o. crti.o must
50                 * be linked first; crtn.o must be linked last.  Because these
51                 * are wildcards, it doesn't matter if the user does not
52                 * actually link against crti.o and crtn.o; the linker won't
53                 * look for a file to match a wildcard.  The wildcard also
54                 * means that it doesn't matter which directory crti.o and
55                 * crtn.o are in.
56                 */
57                PROVIDE (_init = .);
58                *crti.o(.init)
59                *(.init)
60                *crtn.o(.init)
61                PROVIDE (_fini = .);
62                *crti.o(.fini)
63                *(.fini)
64                *crtn.o(.fini)
65
66                /*
67                 * Special FreeBSD sysctl sections.
68                 */
69                . = ALIGN (16);
70                __start_set_sysctl_set = .;
71                *(set_sysctl_*);
72                __stop_set_sysctl_set = ABSOLUTE(.);
73                *(set_domain_*);
74                *(set_pseudo_*);
75
76                /*
77                 * C++ constructors/destructors
78                 *
79                 * gcc uses crtbegin.o to find the start of the constructors
80                 * and destructors so we make sure it is first.  Because this
81                 * is a wildcard, it doesn't matter if the user does not
82                 * actually link against crtbegin.o; the linker won't look for
83                 * a file to match a wildcard.  The wildcard also means that
84                 * it doesn't matter which directory crtbegin.o is in. The
85                 * constructor and destructor list are terminated in
86                 * crtend.o.  The same comments apply to it.
87                 */
88                . = ALIGN (16);
89                *crtbegin.o(.ctors)
90                *(.ctors)
91                *crtend.o(.ctors)
92                *crtbegin.o(.dtors)
93                *(.dtors)
94                *crtend.o(.dtors)
95
96                /*
97                 * Exception frame info
98                 */
99                . = ALIGN (16);
100                *(.eh_frame)
101
102                /*
103                 * Read-only data
104                 */
105                . = ALIGN (16);
106                _rodata_start = .;
107                *(.rodata*)
108                *(.gnu.linkonce.r*)
109
110                 . = ALIGN (16);
111                PROVIDE (_etext = .);
112        }
113        .data 0x80000 : AT (ADDR(.text) + SIZEOF (.text)) {
114                PROVIDE (_copy_start = .);
115                *(.data)
116                *(.gnu.linkonce.d*)
117                *(.gcc_except_table)
118                *(.jcr)
119                . = ALIGN (16);
120                PROVIDE (_edata = .);
121                PROVIDE (_copy_end = .);
122        }
123        .bss ADDR(.data) + SIZEOF(.data) : {
124                _clear_start = .;
125                *(.dynbss)
126                *(.bss* .gnu.linkonce.b.*)
127                *(COMMON)
128                . = ALIGN (16);
129                PROVIDE (end = .);
130
131                . += _StackSize;
132                . = ALIGN (16);
133                _stack_init = .;
134                _clear_end = .;
135
136                _WorkspaceBase = .;
137        }
138
139  /* Stabs debugging sections.  */
140  .stab 0 : { *(.stab) }
141  .stabstr 0 : { *(.stabstr) }
142  .stab.excl 0 : { *(.stab.excl) }
143  .stab.exclstr 0 : { *(.stab.exclstr) }
144  .stab.index 0 : { *(.stab.index) }
145  .stab.indexstr 0 : { *(.stab.indexstr) }
146  .comment 0 : { *(.comment) }
147
148  /* DWARF debug sections.
149     Symbols in the DWARF debugging sections are relative to the beginning
150     of the section so we begin them at 0.  */
151  /* DWARF 1 */
152  .debug          0 : { *(.debug) }
153  .line           0 : { *(.line) }
154 
155  /* GNU DWARF 1 extensions */
156  .debug_srcinfo  0 : { *(.debug_srcinfo) }
157  .debug_sfnames  0 : { *(.debug_sfnames) }
158 
159  /* DWARF 1.1 and DWARF 2 */
160  .debug_aranges  0 : { *(.debug_aranges) }
161  .debug_pubnames 0 : { *(.debug_pubnames) }
162 
163  /* DWARF 2 */
164  .debug_info     0 : { *(.debug_info) }
165  .debug_abbrev   0 : { *(.debug_abbrev) }
166  .debug_line     0 : { *(.debug_line) }
167  .debug_frame    0 : { *(.debug_frame) }
168  .debug_str      0 : { *(.debug_str) }
169  .debug_loc      0 : { *(.debug_loc) }
170  .debug_macinfo  0 : { *(.debug_macinfo) }
171 
172  /* SGI/MIPS DWARF 2 extensions */
173  .debug_weaknames 0 : { *(.debug_weaknames) }
174  .debug_funcnames 0 : { *(.debug_funcnames) }
175  .debug_typenames 0 : { *(.debug_typenames) }
176  .debug_varnames  0 : { *(.debug_varnames) }
177  /* These must appear regardless of  .  */
178}
179
180/* _VBR = 0xFFFFFFFF;            * indicates VBR table is in ROM */
181_VBR = 0x0;                     /* indicates VBR table is in RAM */
182
Note: See TracBrowser for help on using the repository browser.