summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/i386/i386ex/startup/linkcmds
blob: fa7cf47a6057bcd853c5cec5cc93813d9c51272a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/*
 *  This file contains directives for the GNU linker which are specific
 *  to the Intel 386ex evaluation board.
 *
 *  COPYRIGHT (c) 1989-1997.
 *  On-Line Applications Research Corporation (OAR).
 *  Copyright assigned to U.S. Government, 1994.
 *
 *  The license and distribution terms for this file may be
 *  found in the file LICENSE in this distribution or at
 *  http://www.OARcorp.com/rtems/license.html.
 *
 *  $Id$
 */


	ENTRY(reset) ;
SECTIONS
{
	_rom_ints = 0x3fb0000;
	.ints 0x0100 :
	AT ( _rom_ints )          /* was 0x3fb3300 */
	{
	_sints = .;
	*(.ints);
	_eints = ALIGN (0x010);
	}	
	_cs4_ints_segment   = 0x0010 ;   
	_cs4_ints_offset    = 0x0000 ;       
	_cs6_t_ints_segment = 0xF000 ; /* was 0xF000 */ 
	_cs6_t_ints_offset  = 0x0000 ; /* was 0x3300 */
	_cs6_t_ints_size    = _eints - _sints ;

        _rom_gdt = _rom_ints + _cs6_t_ints_size;
	.gdt  0x1000  :
        AT ( _rom_gdt )
	{
	_sgdt = .;
	*(.gdt);
	_egdt = ALIGN (0x10);
	}
	_cs4_gdt_segment   = 0x0100 ; /* evaluates to  0x1000 */
	_cs4_gdt_offset    = 0x0000 ;
	_cs6_t_gdt_segment = 0xF000;
	_cs6_t_gdt_offset  = _cs6_t_ints_size;  /* was 0x0 */
	_cs6_t_gdt_size    = _egdt - _sgdt;

        _rom_idt = _rom_gdt + _cs6_t_gdt_size + _cs6_t_ints_size ;
	.idt 0x1200 :
	AT ( _rom_idt )
	{
	_sidt = .;
	*(.idt);
	_eidt = ALIGN (0x10);
	}
 	_cs4_idt_segment	= 0x0120;
	_cs4_idt_offset		= 0x0000 ;
	_cs6_t_idt_segment	= 0xF000 ;
	_cs6_t_idt_offset   	= _cs6_t_ints_size + _cs6_t_gdt_size ; /* was 0x1000 */
	_cs6_t_idt_size		= _eidt - _sidt;

	_rom_data_start = _rom_idt + _cs6_t_idt_size ;
        .data : 
        AT ( _rom_data_start )       /* was 0x3fd0000 */
        {
        _sdata = .;
        *(.data);
        _edata = ALIGN( 0x10 ) ;
   	}
        _data_start       = ADDR(.data) ;
        _data_size        = _edata - _sdata ;
	_edata            = _data_start + _data_size ;

	.bss :
	{
	_bss_start = .;
	*(.bss);
	*(COMMON);
	_ebss = ALIGN(0x10);
	end = _ebss;
	_end = end;
	__end = end;
	}
        _bss_size = _ebss - _bss_start ;

        
        .text ( 0x3f80000 ):
        {
        _text_start = . ;
        *(.text ) ;
        _etext = ALIGN( 0x10 ); 
        }

	.initial  0x3ff1000:
	{
	*(.initial);
	}

	.reset    0x3fffff0:
	{
	*(.reset);
        }
}