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

4.104.114.84.95
Last change on this file since 4cb5d29 was 4cb5d29, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 29, 2000 at 1:33:23 PM

2000-09-29 Charles-Antoine Gauthier <charles.gauthier@…>

  • startup/linkcmds: Added lines so DWARF debug information would be available. Otherwise gdb complains that the offsets for the debug info are incorrect and doesn't load the files.
  • 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 *  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 * 0x0008000 ->    ...    : initial section ( init 386ex, goto protected mode)
18 *    ...    ->    ...    : text section ( executable code )
19 *    ...    -> 0x00A0000 : data section ( initialized storage )
20 * 0x0100000 -> 0x0200000 : bss section, stack space, heap storage
21 */
22
23        ENTRY(_init_i386ex) ;
24
25SECTIONS
26{
27
28/***************************************************************************
29 * initial section:
30 *
31 * This subsection of ".text" is the first in memory, and executed by the DOS
32 * loader. It initializes the i386ex, sets up the gdt in RAM, loads the gdt,
33 * jumps to protected mode, loads the idt, zeros the bss section, sets up
34 * the stack and calls the rest of the RTEMS initialization.
35 ***************************************************************************/
36
37        _DOS_ld_addr    =       0x0008000 ;
38
39/***************************************************************************
40 * text section:
41 *
42 * Nobody here but us opcodes.
43 ***************************************************************************/
44
45        .text _DOS_ld_addr :
46        {
47        CREATE_OBJECT_SYMBOLS
48        text_start = . ;
49        _text_start = . ;
50
51        *(.initial);
52        . = ALIGN(0x20);
53
54        *(.text );
55        . = ALIGN (0x20);
56
57        *(.eh_frame)
58        . = ALIGN (0x20);
59
60        *(.gnu.linkonce.t*)
61        . = ALIGN(0x20);
62
63        /*
64         * C++ constructors
65         */
66
67        __CTOR_LIST__ = .;
68        LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)
69        *(.ctors)
70        LONG(0)
71        __CTOR_END__ = .;
72        . = ALIGN (4) ;
73        __DTOR_LIST__ = .;
74        LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)
75        *(.dtors)
76        LONG(0)
77        __DTOR_END__ = .;
78
79        _rodata_start = . ;
80        *(.rodata)
81        . = ALIGN(0x20);
82        _erodata = .;
83
84        *(.gnu.linkonce.r*)
85        . = ALIGN(0x20);
86        _endtext = . ;
87        }
88
89/***************************************************************************
90 * ctor/dtor sections:
91 *
92 * These sections house the  global constructors and destructors. 
93 ***************************************************************************/
94
95        .init BLOCK(0x20) :
96        {
97        *(.init)
98        } = 0x9090
99
100        .fini BLOCK(0x20) :
101        {
102        *(.fini)
103        } = 0x9090
104
105/***************************************************************************
106 * data section:
107 *
108 * This section defines the location of the data section in RAM. 
109 ***************************************************************************/
110
111        .data  BLOCK(0x20) :
112        {
113        _sdata = .;
114        *(.data);
115        . = ALIGN(0x20);
116        *(.gnu.linkonce.d*)
117        . = ALIGN(0x20);
118        *(.gcc_except_table)
119        . = ALIGN(0x20);
120        _edata = .;
121        }
122        _data_size        = _edata - _sdata ;
123
124/***************************************************************************
125 * bss section:
126 *
127 * The bss section is the first section in extended RAM ( > 1MB). 
128 ***************************************************************************/
129
130        .bss 0x100000 (NOLOAD) :
131        {
132        _bss_start = .;
133        *(.bss);
134        *(COMMON);
135        _ebss = ALIGN(0x20);
136        }
137        _bss_size   = _ebss - _bss_start ;
138
139/***************************************************************************
140 * discard section:
141 *
142 * This section is used to throw away stuff we don't want. 
143 ***************************************************************************/
144
145        /DISCARD/ :
146        {
147        *(.comment);
148        *(.note);
149        }
150
151/***************************************************************************
152 * General variables:
153 *
154 * The stack_size variable is customizable here.  The heap is located directly
155 * after the stack in RAM.  A routine within bspstart.c uses these variables
156 * to ensure that the heap used by RTEMS is as large as the RAM remaining
157 * after all workspace configurations are complete.
158 ***************************************************************************/
159
160        stack_size  = 0x8000 ;
161        stack_origin = _ebss + stack_size ;
162        heap_bottom  = stack_origin + 4 ; 
163
164
165
166  /* Stabs debugging sections.  */
167  .stab 0 : { *(.stab) }
168  .stabstr 0 : { *(.stabstr) }
169  .stab.excl 0 : { *(.stab.excl) }
170  .stab.exclstr 0 : { *(.stab.exclstr) }
171  .stab.index 0 : { *(.stab.index) }
172  .stab.indexstr 0 : { *(.stab.indexstr) }
173  .comment 0 : { *(.comment) }
174
175  /* DWARF debug sections.
176     Symbols in the DWARF debugging sections are relative to the beginning
177     of the section so we begin them at 0.  */
178  /* DWARF 1 */
179  .debug          0 : { *(.debug) }
180  .line           0 : { *(.line) }
181 
182  /* GNU DWARF 1 extensions */
183  .debug_srcinfo  0 : { *(.debug_srcinfo) }
184  .debug_sfnames  0 : { *(.debug_sfnames) }
185 
186  /* DWARF 1.1 and DWARF 2 */
187  .debug_aranges  0 : { *(.debug_aranges) }
188  .debug_pubnames 0 : { *(.debug_pubnames) }
189 
190  /* DWARF 2 */
191  .debug_info     0 : { *(.debug_info) }
192  .debug_abbrev   0 : { *(.debug_abbrev) }
193  .debug_line     0 : { *(.debug_line) }
194  .debug_frame    0 : { *(.debug_frame) }
195  .debug_str      0 : { *(.debug_str) }
196  .debug_loc      0 : { *(.debug_loc) }
197  .debug_macinfo  0 : { *(.debug_macinfo) }
198 
199  /* SGI/MIPS DWARF 2 extensions */
200  .debug_weaknames 0 : { *(.debug_weaknames) }
201  .debug_funcnames 0 : { *(.debug_funcnames) }
202  .debug_typenames 0 : { *(.debug_typenames) }
203  .debug_varnames  0 : { *(.debug_varnames) }
204  /* These must appear regardless of  .  */
205}
Note: See TracBrowser for help on using the repository browser.