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