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

4.104.114.84.95
Last change on this file since cb3a7ed was cb3a7ed, checked in by Joel Sherrill <joel.sherrill@…>, on 05/17/02 at 18:02:15

2001-05-17 Joel Sherrill <joel@…>

  • startup/linkcmds: Per PR224, added wild card math to .rodata.
  • Property mode set to 100644
File size: 5.4 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.OARcorp.com/rtems/license.html.
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        *(.eh_frame)
57        . = ALIGN (0x20);
58
59        *(.gnu.linkonce.t*)
60        . = ALIGN(0x20);
61
62        /*
63         * C++ constructors
64         */
65
66        __CTOR_LIST__ = .;
67        LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
68        *(.ctors)
69        LONG(0)
70        __CTOR_END__ = .;
71        . = ALIGN (4) ;
72        __DTOR_LIST__ = .;
73        LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
74        *(.dtors)
75        LONG(0)
76        __DTOR_END__ = .;
77
78        _rodata_start = . ;
79        *(.rodata*)
80        . = ALIGN(0x20);
81        _erodata = .;
82
83        *(.gnu.linkonce.r*)
84        . = ALIGN(0x20);
85        _endtext = . ;
86        }
87
88/***************************************************************************
89 * ctor/dtor sections:
90 *
91 * These sections house the  global constructors and destructors. 
92 ***************************************************************************/
93
94        .init BLOCK(0x20) :
95        {
96        *(.init)
97        } = 0x9090
98
99        .fini BLOCK(0x20) :
100        {
101        *(.fini)
102        } = 0x9090
103
104/***************************************************************************
105 * data section:
106 *
107 * This section defines the location of the data section in RAM. 
108 ***************************************************************************/
109
110        .data  BLOCK(0x20) :
111        {
112        _sdata = .;
113        *(.data);
114        . = ALIGN(0x20);
115        *(.gnu.linkonce.d*)
116        . = ALIGN(0x20);
117        *(.gcc_except_table)
118        . = ALIGN(0x20);
119        _edata = .;
120        }
121        _data_size        = _edata - _sdata ;
122
123/***************************************************************************
124 * bss section:
125 *
126 * The bss section is the first section in extended RAM ( > 1MB). 
127 ***************************************************************************/
128
129        .bss 0x100000 (NOLOAD) :
130        {
131        _bss_start = .;
132        *(.bss);
133        *(COMMON);
134        _ebss = ALIGN(0x20);
135        }
136        _bss_size   = _ebss - _bss_start ;
137
138/***************************************************************************
139 * discard section:
140 *
141 * This section is used to throw away stuff we don't want. 
142 ***************************************************************************/
143
144        /DISCARD/ :
145        {
146        *(.comment);
147        *(.note);
148        }
149
150/***************************************************************************
151 * General variables:
152 *
153 * The stack_size variable is customizable here.  The heap is located directly
154 * after the stack in RAM.  A routine within bspstart.c uses these variables
155 * to ensure that the heap used by RTEMS is as large as the RAM remaining
156 * after all workspace configurations are complete.
157 ***************************************************************************/
158
159        stack_size  = 0x8000 ;
160        stack_origin = _ebss + stack_size ;
161        heap_bottom  = stack_origin + 4 ; 
162
163
164
165  /* Stabs debugging sections.  */
166  .stab 0 : { *(.stab) }
167  .stabstr 0 : { *(.stabstr) }
168  .stab.excl 0 : { *(.stab.excl) }
169  .stab.exclstr 0 : { *(.stab.exclstr) }
170  .stab.index 0 : { *(.stab.index) }
171  .stab.indexstr 0 : { *(.stab.indexstr) }
172  .comment 0 : { *(.comment) }
173
174  /* DWARF debug sections.
175     Symbols in the DWARF debugging sections are relative to the beginning
176     of the section so we begin them at 0.  */
177  /* DWARF 1 */
178  .debug          0 : { *(.debug) }
179  .line           0 : { *(.line) }
180 
181  /* GNU DWARF 1 extensions */
182  .debug_srcinfo  0 : { *(.debug_srcinfo) }
183  .debug_sfnames  0 : { *(.debug_sfnames) }
184 
185  /* DWARF 1.1 and DWARF 2 */
186  .debug_aranges  0 : { *(.debug_aranges) }
187  .debug_pubnames 0 : { *(.debug_pubnames) }
188 
189  /* DWARF 2 */
190  .debug_info     0 : { *(.debug_info) }
191  .debug_abbrev   0 : { *(.debug_abbrev) }
192  .debug_line     0 : { *(.debug_line) }
193  .debug_frame    0 : { *(.debug_frame) }
194  .debug_str      0 : { *(.debug_str) }
195  .debug_loc      0 : { *(.debug_loc) }
196  .debug_macinfo  0 : { *(.debug_macinfo) }
197 
198  /* SGI/MIPS DWARF 2 extensions */
199  .debug_weaknames 0 : { *(.debug_weaknames) }
200  .debug_funcnames 0 : { *(.debug_funcnames) }
201  .debug_typenames 0 : { *(.debug_typenames) }
202  .debug_varnames  0 : { *(.debug_varnames) }
203  /* These must appear regardless of  .  */
204}
Note: See TracBrowser for help on using the repository browser.