source: rtems/c/src/lib/libbsp/i386/i386ex/startup/linkcmds @ 3299388d

4.104.114.84.95
Last change on this file since 3299388d was 6ff7e2c, checked in by Joel Sherrill <joel.sherrill@…>, on 09/04/03 at 18:51:20

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

  • clock/ckinit.c, console/console.c, include/bsp.h, include/coverhd.h, 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: URL for license changed.
  • Property mode set to 100644
File size: 6.1 KB
Line 
1/*
2 *  This file contains directives for the GNU linker which are specific
3 *  to the Intel 386ex evaluation board.
4 *
5 *  COPYRIGHT (c) 1989-1999.
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 * 0x3f80000 -> 0x3ff0000 : text section
17 * 0x3ff0000 -> 0x3ff0028 : global descriptor table in ROM
18 * 0x3ff0028 -> 0x3fff000 : data section ( copied by start.s to RAM )
19 * 0x3fff000 -> 0x3fffff0 : initial section ( init 386ex, goto protected mode, copy ROM-RAM )
20 * 0x3fffff0 -> 0x4000000 : reset section ( jmp to initial only )
21 */
22
23        ENTRY(reset) ;
24SECTIONS
25{
26
27/****************************************************************************************
28 * data section:
29 *
30 * This section defines the locations of the data section in ROM as well as in RAM. 
31 * start.s copies the data section to RAM in real mode.  This is done PRIOR to the lgdt
32 * instruction since the data section contains the Global_descriptor_table and GDTR.
33 ***********************************************************************************/
34
35        _rom_data_start = 0x3ff0000;
36
37        _rom_data_segment   = 0xF000;
38        _rom_data_offset    = 0x0;
39
40        _ram_data_segment   = 0x0000 ;
41        _ram_data_offset    = 0x0;
42        _ram_data_location  = _ram_data_segment * 16 + _ram_data_offset;
43
44        .init : { _init = .; *(.init) } = 0x9090
45        .fini : { _fini = .; *(.fini) } = 0x9090
46        .data  :
47        AT ( _rom_data_start )
48        {
49        _sdata = .;
50        *(.data);
51        _edata = .;
52        }
53        _data_start       = ADDR(.data) ;
54         data_start       = _data_start ;
55        _data_size        = _edata - _sdata ;
56
57/**************************************************************************************
58 * bss section:
59 *
60 * The bss section is the last section in RAM. 
61 *************************************************************************************/
62        _edata = ALIGN( 0x10 ); 
63        .bss :
64        {
65        _bss_start = .;
66        *(.bss);
67        *(COMMON);
68        _ebss = ALIGN(0x10);
69        end = _ebss;
70        _end = end;
71        __end = end;
72        }
73        _bss_size   = _ebss - _bss_start ;
74
75/**************************************************************************************
76 * General variables:
77 *
78 * The stack_size variable is customizable here.  The heap is located directly after
79 * The stack in RAM.  A routine within bspstart.c uses these variables to ensure that
80 * the heap used by RTEMS is as large as the RAM remaining after all workspace configurations
81 * are complete.
82 *************************************************************************************/
83        stack_size  = 0x8000 ;
84        stack_origin = end + stack_size ;
85        heap_bottom  = stack_origin + 4 ; 
86
87/***************************************************************************************
88 * text section:
89 *
90 * This section is NOT copied into RAM.  It is left in ROM, as the flash ROM is quick enough.
91 ***************************************************************************************/
92        .text ( 0x3f80000 ):
93        {
94         CREATE_OBJECT_SYMBOLS
95        text_start = . ;
96        _text_start = . ;
97        *(.text ) ;
98        /*
99         * Special FreeBSD sysctl sections.
100         */
101        . = ALIGN (16);
102        __start_set_sysctl_set = .;
103        *(set_sysctl_*);
104        __stop_set_sysctl_set = ABSOLUTE(.);
105        *(set_domain_*);
106        *(set_pseudo_*);
107
108        *(.eh_fram)
109
110        . = ALIGN (16);
111
112        /*
113         * C++ constructors
114         */
115        __CTOR_LIST__ = .;
116        LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
117        *(.ctors)
118        LONG(0)
119        __CTOR_END__ = .;
120        . = ALIGN (4) ;
121        __DTOR_LIST__ = .;
122        LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
123        *(.dtors)
124        LONG(0)
125        __DTOR_END__ = .;
126        _rodata_start = . ;
127        *(.rodata*)
128        *(.eh_frame)
129        *(.gnu.linkonce.r*)
130        _erodata = ALIGN( 0x10 ) ;
131        _etext = ALIGN( 0x10 );
132        _endtext = . ;
133        }
134
135/*******************************************************************************************
136 * initial section:
137 *
138 * This section is defined after the data section.  It must be in the top 64K of memory
139 * to enable the initial short jmp from the reset section while still in real-mode. It
140 * initializes the i386ex, moves the gdt from ROM to RAM,loads the gdt,
141 * jumps to protected mode, copies the data section from ROM to RAM and loads the idt.
142 ******************************************************************************************/
143
144        .initial _rom_data_start + _data_size :
145        {
146        *(.initial);
147        }
148
149/*******************************************************************************************
150 * board reset section:
151 *
152 * This section contains the short jmp from the reset section to the initial section.  It is
153 * the first code executed on reset/power on.
154 ******************************************************************************************/
155
156        .reset 0x3fffff0:
157        {
158        *(.reset);
159        }
160
161
162  /* Stabs debugging sections.  */
163  .stab 0 : { *(.stab) }
164  .stabstr 0 : { *(.stabstr) }
165  .stab.excl 0 : { *(.stab.excl) }
166  .stab.exclstr 0 : { *(.stab.exclstr) }
167  .stab.index 0 : { *(.stab.index) }
168  .stab.indexstr 0 : { *(.stab.indexstr) }
169  .comment 0 : { *(.comment) }
170
171  /* DWARF debug sections.
172     Symbols in the DWARF debugging sections are relative to the beginning
173     of the section so we begin them at 0.  */
174  /* DWARF 1 */
175  .debug          0 : { *(.debug) }
176  .line           0 : { *(.line) }
177 
178  /* GNU DWARF 1 extensions */
179  .debug_srcinfo  0 : { *(.debug_srcinfo) }
180  .debug_sfnames  0 : { *(.debug_sfnames) }
181 
182  /* DWARF 1.1 and DWARF 2 */
183  .debug_aranges  0 : { *(.debug_aranges) }
184  .debug_pubnames 0 : { *(.debug_pubnames) }
185 
186  /* DWARF 2 */
187  .debug_info     0 : { *(.debug_info) }
188  .debug_abbrev   0 : { *(.debug_abbrev) }
189  .debug_line     0 : { *(.debug_line) }
190  .debug_frame    0 : { *(.debug_frame) }
191  .debug_str      0 : { *(.debug_str) }
192  .debug_loc      0 : { *(.debug_loc) }
193  .debug_macinfo  0 : { *(.debug_macinfo) }
194 
195  /* SGI/MIPS DWARF 2 extensions */
196  .debug_weaknames 0 : { *(.debug_weaknames) }
197  .debug_funcnames 0 : { *(.debug_funcnames) }
198  .debug_typenames 0 : { *(.debug_typenames) }
199  .debug_varnames  0 : { *(.debug_varnames) }
200  /* These must appear regardless of  .  */
201}
Note: See TracBrowser for help on using the repository browser.