source: rtems/c/src/lib/libbsp/m68k/efi68k/startup/linkcmds @ 9c1133e

4.104.114.84.95
Last change on this file since 9c1133e was 9c1133e, checked in by Joel Sherrill <joel.sherrill@…>, on 01/20/03 at 19:57:14

mkChangeLogList [-n]

  • Property mode set to 100644
File size: 5.4 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                 * Special FreeBSD sysctl sections.
104                 */
105                . = ALIGN (16);
106                __start_set_sysctl_set = .;
107                *(set_sysctl_*);
108                __stop_set_sysctl_set = ABSOLUTE(.);
109                *(set_domain_*);
110                *(set_pseudo_*);
111
112                /*
113                 * C++ constructors/destructors
114                 *
115                 * gcc uses crtbegin.o to find the start of the constructors
116                 * and destructors so we make sure it is first.  Because this
117                 * is a wildcard, it doesn't matter if the user does not
118                 * actually link against crtbegin.o; the linker won't look for
119                 * a file to match a wildcard.  The wildcard also means that
120                 * it doesn't matter which directory crtbegin.o is in. The
121                 * constructor and destructor list are terminated in
122                 * crtend.o.  The same comments apply to it.
123                 */
124                . = ALIGN (16);
125                *crtbegin.o(.ctors)
126                *(.ctors)
127                *crtend.o(.ctors)
128                *crtbegin.o(.dtors)
129                *(.dtors)
130                *crtend.o(.dtors)
131
132                /*
133                 * Exception frame info
134                 */
135                . = ALIGN (16);
136                *(.eh_frame)
137
138                /*
139                 * Read-only data
140                 */
141                . = ALIGN (16);
142                _rodata_start = . ;
143                *(.rodata*)
144                *(.gnu.linkonce.r*)
145
146                 . = ALIGN (16);
147                PROVIDE (_etext = .);
148        } >ram
149        .data : {
150                PROVIDE (_copy_start = .);
151                *(.data)
152                *(.gnu.linkonce.d*)
153                *(.gcc_except_table)
154                *(.jcr)
155                . = ALIGN (16);
156                PROVIDE (_edata = .);
157                PROVIDE (_copy_end = .);
158        } >ram
159        .bss : {
160                _clear_start = .;
161                *(.bss)
162                *(COMMON)
163                . = ALIGN (16);
164                PROVIDE (end = .);
165
166                . += _StackSize;
167                . = ALIGN (16);
168                _stack_init = .;
169                _clear_end = .;
170
171                _WorkspaceBase = .;
172        } >ram
173
174  /* Stabs debugging sections.  */
175  .stab 0 : { *(.stab) }
176  .stabstr 0 : { *(.stabstr) }
177  .stab.excl 0 : { *(.stab.excl) }
178  .stab.exclstr 0 : { *(.stab.exclstr) }
179  .stab.index 0 : { *(.stab.index) }
180  .stab.indexstr 0 : { *(.stab.indexstr) }
181  .comment 0 : { *(.comment) }
182
183  /* DWARF debug sections.
184     Symbols in the DWARF debugging sections are relative to the beginning
185     of the section so we begin them at 0.  */
186  /* DWARF 1 */
187  .debug          0 : { *(.debug) }
188  .line           0 : { *(.line) }
189 
190  /* GNU DWARF 1 extensions */
191  .debug_srcinfo  0 : { *(.debug_srcinfo) }
192  .debug_sfnames  0 : { *(.debug_sfnames) }
193 
194  /* DWARF 1.1 and DWARF 2 */
195  .debug_aranges  0 : { *(.debug_aranges) }
196  .debug_pubnames 0 : { *(.debug_pubnames) }
197 
198  /* DWARF 2 */
199  .debug_info     0 : { *(.debug_info) }
200  .debug_abbrev   0 : { *(.debug_abbrev) }
201  .debug_line     0 : { *(.debug_line) }
202  .debug_frame    0 : { *(.debug_frame) }
203  .debug_str      0 : { *(.debug_str) }
204  .debug_loc      0 : { *(.debug_loc) }
205  .debug_macinfo  0 : { *(.debug_macinfo) }
206 
207  /* SGI/MIPS DWARF 2 extensions */
208  .debug_weaknames 0 : { *(.debug_weaknames) }
209  .debug_funcnames 0 : { *(.debug_funcnames) }
210  .debug_typenames 0 : { *(.debug_typenames) }
211  .debug_varnames  0 : { *(.debug_varnames) }
212  /* These must appear regardless of  .  */
213}
Note: See TracBrowser for help on using the repository browser.