source: rtems/c/src/lib/libbsp/m68k/ods68302/startup/linkcmds @ df25c998

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