source: rtems/c/src/lib/libbsp/m68k/mvme162/startup/linkcmds @ 9f30a08b

4.104.114.84.95
Last change on this file since 9f30a08b was 9f30a08b, checked in by Joel Sherrill <joel.sherrill@…>, on 09/29/00 at 14:25:46

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: 4.8 KB
Line 
1/*
2 *  This file contains directives for the GNU linker which are specific
3 *  to the Motorola MVME162 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 *  Modifications of respective RTEMS file: COPYRIGHT (c) 1994.
13 *  EISCAT Scientific Association. M.Savitski
14 *
15 *  This material is a part of the MVME162 Board Support Package
16 *  for the RTEMS executive. Its licensing policies are those of the
17 *  RTEMS above.
18 *
19 *  $Id$
20 */
21
22/*
23 * Declare some sizes.
24 */
25_RamBase = DEFINED(_RamBase) ? _RamBase : 0x20000;
26_RamSize = DEFINED(_RamSize) ? _RamSize : 1M;
27_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x10000;
28_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
29
30MEMORY
31{
32        ram : org = 0x000000, l = 1M
33}
34
35SECTIONS
36{
37        ram : {
38                . = .;
39        } >ram
40
41        /*
42         * Text, data and bss segments
43         */
44        .text 0x20000 : {
45                *(.text)
46
47                /*
48                 * C++ constructors/destructors
49                 */
50                *(.gnu.linkonce.t.*)
51
52                /*
53                 * Initialization and finalization code.
54                 *
55                 * Various files can provide initialization and finalization
56                 * functions.  crtbegin.o and crtend.o are two instances. The
57                 * body of these functions are in .init and .fini sections. We
58                 * accumulate the bodies here, and prepend function prologues
59                 * from crti.o and function epilogues from crtn.o. crti.o must
60                 * be linked first; crtn.o must be linked last.  Because these
61                 * are wildcards, it doesn't matter if the user does not
62                 * actually link against crti.o and crtn.o; the linker won't
63                 * look for a file to match a wildcard.  The wildcard also
64                 * means that it doesn't matter which directory crti.o and
65                 * crtn.o are in.
66                 */
67                PROVIDE (_init = .);
68                *crti.o(.init)
69                *(.init)
70                *crtn.o(.init)
71                PROVIDE (_fini = .);
72                *crti.o(.fini)
73                *(.fini)
74                *crtn.o(.fini)
75
76                /*
77                 * C++ constructors/destructors
78                 *
79                 * gcc uses crtbegin.o to find the start of the constructors
80                 * and destructors so we make sure it is first.  Because this
81                 * is a wildcard, it doesn't matter if the user does not
82                 * actually link against crtbegin.o; the linker won't look for
83                 * a file to match a wildcard.  The wildcard also means that
84                 * it doesn't matter which directory crtbegin.o is in. The
85                 * constructor and destructor list are terminated in
86                 * crtend.o.  The same comments apply to it.
87                 */
88                . = ALIGN (16);
89                *crtbegin.o(.ctors)
90                *(.ctors)
91                *crtend.o(.ctors)
92                *crtbegin.o(.dtors)
93                *(.dtors)
94                *crtend.o(.dtors)
95
96                /*
97                 * Exception frame info
98                 */
99                . = ALIGN (16);
100                *(.eh_frame)
101
102                /*
103                 * Read-only data
104                 */
105                . = ALIGN (16);
106                _rodata_start = . ;
107                *(.rodata)
108                *(.gnu.linkonce.r*)
109
110                 . = ALIGN (16);
111                PROVIDE (_etext = .);
112        } >ram
113        .data : {
114                PROVIDE (_copy_start = .);
115                *(.data)
116                *(.gnu.linkonce.d*)
117                *(.gcc_except_table)
118                . = ALIGN (16);
119                PROVIDE (_edata = .);
120                PROVIDE (_copy_end = .);
121        } >ram
122        .bss : {
123                _clear_start = .;
124                *(.bss)
125                *(COMMON)
126                . = ALIGN (16);
127                PROVIDE (end = .);
128
129                . += _StackSize;
130                . = ALIGN (16);
131                _stack_init = .;
132                _clear_end = .;
133
134                _WorkspaceBase = .;
135        } >ram
136
137  /* Stabs debugging sections.  */
138  .stab 0 : { *(.stab) }
139  .stabstr 0 : { *(.stabstr) }
140  .stab.excl 0 : { *(.stab.excl) }
141  .stab.exclstr 0 : { *(.stab.exclstr) }
142  .stab.index 0 : { *(.stab.index) }
143  .stab.indexstr 0 : { *(.stab.indexstr) }
144  .comment 0 : { *(.comment) }
145
146  /* DWARF debug sections.
147     Symbols in the DWARF debugging sections are relative to the beginning
148     of the section so we begin them at 0.  */
149  /* DWARF 1 */
150  .debug          0 : { *(.debug) }
151  .line           0 : { *(.line) }
152 
153  /* GNU DWARF 1 extensions */
154  .debug_srcinfo  0 : { *(.debug_srcinfo) }
155  .debug_sfnames  0 : { *(.debug_sfnames) }
156 
157  /* DWARF 1.1 and DWARF 2 */
158  .debug_aranges  0 : { *(.debug_aranges) }
159  .debug_pubnames 0 : { *(.debug_pubnames) }
160 
161  /* DWARF 2 */
162  .debug_info     0 : { *(.debug_info) }
163  .debug_abbrev   0 : { *(.debug_abbrev) }
164  .debug_line     0 : { *(.debug_line) }
165  .debug_frame    0 : { *(.debug_frame) }
166  .debug_str      0 : { *(.debug_str) }
167  .debug_loc      0 : { *(.debug_loc) }
168  .debug_macinfo  0 : { *(.debug_macinfo) }
169 
170  /* SGI/MIPS DWARF 2 extensions */
171  .debug_weaknames 0 : { *(.debug_weaknames) }
172  .debug_funcnames 0 : { *(.debug_funcnames) }
173  .debug_typenames 0 : { *(.debug_typenames) }
174  .debug_varnames  0 : { *(.debug_varnames) }
175  /* These must appear regardless of  .  */
176}
Note: See TracBrowser for help on using the repository browser.