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