source: rtems/c/src/lib/libbsp/i386/i386ex/startup/linkcmds @ 7b0c547a

4.104.114.84.95
Last change on this file since 7b0c547a was 7b0c547a, checked in by Joel Sherrill <joel.sherrill@…>, on Jan 20, 2003 at 7:53:27 PM

2003-01-20 Joel Sherrill <joel@…>

  • startup/linkcmds: Add FreeBSD SYSCTL() sections for networking.
  • Property mode set to 100644
File size: 6.0 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.OARcorp.com/rtems/license.html.
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        *(.gnu.linkonce.r*)
129        _erodata = ALIGN( 0x10 ) ;
130        _etext = ALIGN( 0x10 );
131        _endtext = . ;
132        }
133
134/*******************************************************************************************
135 * initial section:
136 *
137 * This section is defined after the data section.  It must be in the top 64K of memory
138 * to enable the initial short jmp from the reset section while still in real-mode. It
139 * initializes the i386ex, moves the gdt from ROM to RAM,loads the gdt,
140 * jumps to protected mode, copies the data section from ROM to RAM and loads the idt.
141 ******************************************************************************************/
142
143        .initial _rom_data_start + _data_size :
144        {
145        *(.initial);
146        }
147
148/*******************************************************************************************
149 * board reset section:
150 *
151 * This section contains the short jmp from the reset section to the initial section.  It is
152 * the first code executed on reset/power on.
153 ******************************************************************************************/
154
155        .reset 0x3fffff0:
156        {
157        *(.reset);
158        }
159
160
161  /* Stabs debugging sections.  */
162  .stab 0 : { *(.stab) }
163  .stabstr 0 : { *(.stabstr) }
164  .stab.excl 0 : { *(.stab.excl) }
165  .stab.exclstr 0 : { *(.stab.exclstr) }
166  .stab.index 0 : { *(.stab.index) }
167  .stab.indexstr 0 : { *(.stab.indexstr) }
168  .comment 0 : { *(.comment) }
169
170  /* DWARF debug sections.
171     Symbols in the DWARF debugging sections are relative to the beginning
172     of the section so we begin them at 0.  */
173  /* DWARF 1 */
174  .debug          0 : { *(.debug) }
175  .line           0 : { *(.line) }
176 
177  /* GNU DWARF 1 extensions */
178  .debug_srcinfo  0 : { *(.debug_srcinfo) }
179  .debug_sfnames  0 : { *(.debug_sfnames) }
180 
181  /* DWARF 1.1 and DWARF 2 */
182  .debug_aranges  0 : { *(.debug_aranges) }
183  .debug_pubnames 0 : { *(.debug_pubnames) }
184 
185  /* DWARF 2 */
186  .debug_info     0 : { *(.debug_info) }
187  .debug_abbrev   0 : { *(.debug_abbrev) }
188  .debug_line     0 : { *(.debug_line) }
189  .debug_frame    0 : { *(.debug_frame) }
190  .debug_str      0 : { *(.debug_str) }
191  .debug_loc      0 : { *(.debug_loc) }
192  .debug_macinfo  0 : { *(.debug_macinfo) }
193 
194  /* SGI/MIPS DWARF 2 extensions */
195  .debug_weaknames 0 : { *(.debug_weaknames) }
196  .debug_funcnames 0 : { *(.debug_funcnames) }
197  .debug_typenames 0 : { *(.debug_typenames) }
198  .debug_varnames  0 : { *(.debug_varnames) }
199  /* These must appear regardless of  .  */
200}
Note: See TracBrowser for help on using the repository browser.