source: rtems/c/src/lib/libbsp/i386/ts_386ex/startup/linkcmds @ 5c7f274

4.104.114.84.95
Last change on this file since 5c7f274 was e61df10, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:51:28

2003-09-04 Joel Sherrill <joel@…>

  • clock/ckinit.c, clock/rtc.c, console/console.c, include/bsp.h, include/coverhd.h, network/ne2000.c, start/80386ex.h, start/80386ex.inc, start/macros.inc, start/start.S, startup/bspstart.c, startup/linkcmds, startup/setvec.c, timer/timer.c, timer/timerisr.S, tools/debug_ada/init.c, tools/debug_c/init.c, tools/debug_c/serial_gdb.c, tools/debug_c/system.h, tools/network_ada/listener/init.c, tools/network_ada/tcprelay/init.c, tools/ts_1325_ada/init.c: URL for license changed.
  • Property mode set to 100644
File size: 5.6 KB
Line 
1/*
2 *  This file contains directives for the GNU linker which are specific
3 *  to the Technologic Systems TS-1325 (i386ex) board.
4 *
5 *  Copyright (c) 1989-1998.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.rtems.com/license/LICENSE.
11 *
12 *  $Id$
13 *
14 * Memory layout:
15 *
16 * 0x0008000 ->    ...    : initial section ( init 386ex, goto protected mode)
17 *    ...    ->    ...    : text section ( executable code )
18 *    ...    -> 0x00A0000 : data section ( initialized storage )
19 * 0x0100000 -> 0x0200000 : bss section, stack space, heap storage
20 */
21
22        ENTRY(_init_i386ex) ;
23
24SECTIONS
25{
26
27/***************************************************************************
28 * initial section:
29 *
30 * This subsection of ".text" is the first in memory, and executed by the DOS
31 * loader. It initializes the i386ex, sets up the gdt in RAM, loads the gdt,
32 * jumps to protected mode, loads the idt, zeros the bss section, sets up
33 * the stack and calls the rest of the RTEMS initialization.
34 ***************************************************************************/
35
36        _DOS_ld_addr    =       0x0008000 ;
37
38/***************************************************************************
39 * text section:
40 *
41 * Nobody here but us opcodes.
42 ***************************************************************************/
43
44        .text _DOS_ld_addr :
45        {
46        CREATE_OBJECT_SYMBOLS
47        text_start = . ;
48        _text_start = . ;
49
50        *(.initial);
51        . = ALIGN(0x20);
52
53        *(.text );
54        . = ALIGN (0x20);
55
56        /*
57         * Special FreeBSD sysctl sections.
58         */
59        . = ALIGN (16);
60        __start_set_sysctl_set = .;
61        *(set_sysctl_*);
62        __stop_set_sysctl_set = ABSOLUTE(.);
63        *(set_domain_*);
64        *(set_pseudo_*);
65
66        *(.eh_frame)
67        . = ALIGN (0x20);
68
69        *(.gnu.linkonce.t*)
70        . = ALIGN(0x20);
71
72        /*
73         * C++ constructors
74         */
75
76        __CTOR_LIST__ = .;
77        LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
78        *(.ctors)
79        LONG(0)
80        __CTOR_END__ = .;
81        . = ALIGN (4) ;
82        __DTOR_LIST__ = .;
83        LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
84        *(.dtors)
85        LONG(0)
86        __DTOR_END__ = .;
87
88        _rodata_start = . ;
89        *(.rodata*)
90        . = ALIGN(0x20);
91        _erodata = .;
92
93        *(.gnu.linkonce.r*)
94        . = ALIGN(0x20);
95        _endtext = . ;
96        }
97
98/***************************************************************************
99 * ctor/dtor sections:
100 *
101 * These sections house the  global constructors and destructors. 
102 ***************************************************************************/
103
104        .init BLOCK(0x20) :
105        {
106        *(.init)
107        } = 0x9090
108
109        .fini BLOCK(0x20) :
110        {
111        *(.fini)
112        } = 0x9090
113
114/***************************************************************************
115 * data section:
116 *
117 * This section defines the location of the data section in RAM. 
118 ***************************************************************************/
119
120        .data  BLOCK(0x20) :
121        {
122        _sdata = .;
123        *(.data);
124        . = ALIGN(0x20);
125        *(.gnu.linkonce.d*)
126        . = ALIGN(0x20);
127        *(.gcc_except_table)
128        . = ALIGN(0x20);
129        _edata = .;
130        }
131        _data_size        = _edata - _sdata ;
132
133/***************************************************************************
134 * bss section:
135 *
136 * The bss section is the first section in extended RAM ( > 1MB). 
137 ***************************************************************************/
138
139        .bss 0x100000 (NOLOAD) :
140        {
141        _bss_start = .;
142        *(.bss);
143        *(COMMON);
144        _ebss = ALIGN(0x20);
145        }
146        _bss_size   = _ebss - _bss_start ;
147
148/***************************************************************************
149 * discard section:
150 *
151 * This section is used to throw away stuff we don't want. 
152 ***************************************************************************/
153
154        /DISCARD/ :
155        {
156        *(.comment);
157        *(.note);
158        }
159
160/***************************************************************************
161 * General variables:
162 *
163 * The stack_size variable is customizable here.  The heap is located directly
164 * after the stack in RAM.  A routine within bspstart.c uses these variables
165 * to ensure that the heap used by RTEMS is as large as the RAM remaining
166 * after all workspace configurations are complete.
167 ***************************************************************************/
168
169        stack_size  = 0x8000 ;
170        stack_origin = _ebss + stack_size ;
171        heap_bottom  = stack_origin + 4 ; 
172
173
174
175  /* Stabs debugging sections.  */
176  .stab 0 : { *(.stab) }
177  .stabstr 0 : { *(.stabstr) }
178  .stab.excl 0 : { *(.stab.excl) }
179  .stab.exclstr 0 : { *(.stab.exclstr) }
180  .stab.index 0 : { *(.stab.index) }
181  .stab.indexstr 0 : { *(.stab.indexstr) }
182  .comment 0 : { *(.comment) }
183
184  /* DWARF debug sections.
185     Symbols in the DWARF debugging sections are relative to the beginning
186     of the section so we begin them at 0.  */
187  /* DWARF 1 */
188  .debug          0 : { *(.debug) }
189  .line           0 : { *(.line) }
190 
191  /* GNU DWARF 1 extensions */
192  .debug_srcinfo  0 : { *(.debug_srcinfo) }
193  .debug_sfnames  0 : { *(.debug_sfnames) }
194 
195  /* DWARF 1.1 and DWARF 2 */
196  .debug_aranges  0 : { *(.debug_aranges) }
197  .debug_pubnames 0 : { *(.debug_pubnames) }
198 
199  /* DWARF 2 */
200  .debug_info     0 : { *(.debug_info) }
201  .debug_abbrev   0 : { *(.debug_abbrev) }
202  .debug_line     0 : { *(.debug_line) }
203  .debug_frame    0 : { *(.debug_frame) }
204  .debug_str      0 : { *(.debug_str) }
205  .debug_loc      0 : { *(.debug_loc) }
206  .debug_macinfo  0 : { *(.debug_macinfo) }
207 
208  /* SGI/MIPS DWARF 2 extensions */
209  .debug_weaknames 0 : { *(.debug_weaknames) }
210  .debug_funcnames 0 : { *(.debug_funcnames) }
211  .debug_typenames 0 : { *(.debug_typenames) }
212  .debug_varnames  0 : { *(.debug_varnames) }
213  /* These must appear regardless of  .  */
214}
Note: See TracBrowser for help on using the repository browser.