source: rtems/c/src/lib/libbsp/i386/i386ex/startup/linkcmds @ 04bc5d9

4.104.114.84.95
Last change on this file since 04bc5d9 was 04bc5d9, checked in by Joel Sherrill <joel.sherrill@…>, on 09/21/98 at 00:23:02

Update from Erik Ivanenko <erik.ivanenko@…> to bring the
i386ex bsp up to date.

1) A 'hlt' instruction is coded in case of a return from boot_card in

start.s.

  • Property mode set to 100644
File size: 4.5 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-1998.
6 *  On-Line Applications Research Corporation (OAR).
7 *  Copyright assigned to U.S. Government, 1994.
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 *
15 * Memory layout:
16 *
17 * 0x3f80000 -> 0x3ff0000 : text section
18 * 0x3ff0000 -> 0x3ff0028 : global descriptor table in ROM
19 * 0x3ff0028 -> 0x3fff000 : data section ( copied by start.s to RAM )
20 * 0x3fff000 -> 0x3fffff0 : initial section ( init 386ex, goto protected mode, copy ROM-RAM )
21 * 0x3fffff0 -> 0x4000000 : reset section ( jmp to initial only )
22 */
23
24        ENTRY(reset) ;
25SECTIONS
26{
27
28/****************************************************************************************
29 * data section:
30 *
31 * This section defines the locations of the data section in ROM as well as in RAM. 
32 * start.s copies the data section to RAM in real mode.  This is done PRIOR to the lgdt
33 * instruction since the data section contains the Global_descriptor_table and GDTR.
34 ***********************************************************************************/
35
36        _rom_data_start = 0x3ff0000;
37
38        _rom_data_segment   = 0xF000;
39        _rom_data_offset    = 0x0;
40
41        _ram_data_segment   = 0x0000 ;
42        _ram_data_offset    = 0x0;
43        _ram_data_location  = _ram_data_segment * 16 + _ram_data_offset;
44
45        .data  :
46        AT ( _rom_data_start )
47        {
48        _sdata = .;
49        *(.data);
50        _edata = .;
51        }
52        _data_start       = ADDR(.data) ;
53         data_start       = _data_start ;
54        _data_size        = _edata - _sdata ;
55
56/**************************************************************************************
57 * bss section:
58 *
59 * The bss section is the last section in RAM. 
60 *************************************************************************************/
61        _edata = ALIGN( 0x10 ); 
62        .bss :
63        {
64        _bss_start = .;
65        *(.bss);
66        *(COMMON);
67        _ebss = ALIGN(0x10);
68        end = _ebss;
69        _end = end;
70        __end = end;
71        }
72        _bss_size   = _ebss - _bss_start ;
73
74/**************************************************************************************
75 * General variables:
76 *
77 * The stack_size variable is customizable here.  The heap is located directly after
78 * The stack in RAM.  A routine within bspstart.c uses these variables to ensure that
79 * the heap used by RTEMS is as large as the RAM remaining after all workspace configurations
80 * are complete.
81 *************************************************************************************/
82        stack_size  = 0x8000 ;
83        stack_origin = end + stack_size ;
84        heap_bottom  = stack_origin + 4 ; 
85
86/***************************************************************************************
87 * text section:
88 *
89 * This section is NOT copied into RAM.  It is left in ROM, as the flash ROM is quick enough.
90 ***************************************************************************************/
91        .text ( 0x3f80000 ):
92        {
93         CREATE_OBJECT_SYMBOLS
94        text_start = . ;
95        _text_start = . ;
96        *(.text ) ;
97        . = ALIGN (16);
98
99        *(.eh_fram)
100        . = ALIGN (16);
101
102        /*
103         * C++ constructors
104         */
105        __CTOR_LIST__ = .;
106        LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
107        *(.ctors)
108        LONG(0)
109        __CTOR_END__ = .;
110        . = ALIGN (4) ;
111        __DTOR_LIST__ = .;
112        LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
113        *(.dtors)
114        LONG(0)
115        __DTOR_END__ = .;
116        _etext = ALIGN( 0x10 );
117        _endtext = . ;
118        }
119
120/*******************************************************************************************
121 * initial section:
122 *
123 * This section is defined after the data section.  It must be in the top 64K of memory
124 * to enable the initial short jmp from the reset section while still in real-mode. It
125 * initializes the i386ex, moves the gdt from ROM to RAM,loads the gdt,
126 * jumps to protected mode, copies the data section from ROM to RAM and loads the idt.
127 ******************************************************************************************/
128
129        .initial _rom_data_start + _data_size :
130        {
131        *(.initial);
132        }
133
134/*******************************************************************************************
135 * board reset section:
136 *
137 * This section contains the short jmp from the reset section to the initial section.  It is
138 * the first code executed on reset/power on.
139 ******************************************************************************************/
140
141        .reset 0x3fffff0:
142        {
143        *(.reset);
144        }
145}
Note: See TracBrowser for help on using the repository browser.