source: rtems/c/src/lib/libbsp/m68k/gen68360/startup/linkcmds @ bebf0438

4.104.114.84.95
Last change on this file since bebf0438 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: 3.9 KB
Line 
1/*
2 * This file contains GNU linker directives for a generic MC68360 board.
3 * Variations in memory size and allocation can be made by
4 * overriding some values with linker command-line arguments.
5 *
6 * Saskatchewan Accelerator Laboratory
7 * University of Saskatchewan
8 * Saskatoon, Saskatchewan, CANADA
9 * eric@skatter.usask.ca
10 *
11 *  $Id$
12 */
13
14/*
15 * Declare some sizes.
16 * A heap size of 0 means `use all available memory for the heap'.
17 */
18_RamBase = DEFINED(_RamBase) ? _RamBase : 0x0;
19_RamSize = DEFINED(_RamSize) ? _RamSize : 64M;
20_HeapSize = DEFINED(_HeapSize) ? _HeapSize : 0x0;
21_StackSize = DEFINED(_StackSize) ? _StackSize : 0x1000;
22
23/*
24 * Declare on-board memory.
25 */
26MEMORY {
27          ram : ORIGIN = 0x00000000, LENGTH = 64M
28          rom : ORIGIN = 0x0F000000, LENGTH = 1M
29        dpram : ORIGIN = 0x0E000000, LENGTH = 8k
30}
31
32/*
33 * Load objects
34 */
35SECTIONS {
36        /*
37         * Boot PROM
38         */
39        rom : {
40                _RomBase = .;
41        } >rom
42
43        /*
44         * Dynamic RAM
45         */
46        ram : {
47                _RamBase = .;
48        } >ram
49
50        /*
51         * Text, data and bss segments
52         */
53        .text : {
54                *(.text)
55
56                /*
57                 * C++ constructors/destructors
58                 */
59                *(.gnu.linkonce.t.*)
60
61                /*
62                 * Initialization and finalization code.
63                 */
64                PROVIDE (_init = .);
65                *crti.o(.init)
66                *(.init)
67                *crtn.o(.init)
68                PROVIDE (_fini = .);
69                *crti.o(.fini)
70                *(.fini)
71                *crtn.o(.fini)
72
73                /*
74                 * C++ constructors/destructors
75                 */
76                . = ALIGN (16);
77                *crtbegin.o(.ctors)
78                *(.ctors)
79                *crtend.o(.ctors)
80                *crtbegin.o(.dtors)
81                *(.dtors)
82                *crtend.o(.dtors)
83
84                /*
85                 * Exception frame info
86                 */
87                . = ALIGN (16);
88                *(.eh_frame)
89
90                /*
91                 * Read-only data
92                 */
93                . = ALIGN (16);
94                _rodata_start = . ;
95                *(.rodata)
96                *(.gnu.linkonce.r*)
97
98                 . = ALIGN (16);
99                PROVIDE (etext = .);
100        } >ram
101        .data : {
102                _copy_start = .;
103                *(.data)
104                *(.gnu.linkonce.d*)
105                *(.gcc_except_table)
106                . = ALIGN (16);
107                PROVIDE (edata = .);
108                _copy_end = .;
109        } >ram
110        .bss : {
111                M68Kvec = .;
112                . += (256 * 4);
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        } >ram
126
127        /*
128         * On-chip memory/peripherals
129         */
130        dpram : {
131                m360 = .;
132                . += (8 * 1024);
133        } >dpram
134
135  /* Stabs debugging sections.  */
136  .stab 0 : { *(.stab) }
137  .stabstr 0 : { *(.stabstr) }
138  .stab.excl 0 : { *(.stab.excl) }
139  .stab.exclstr 0 : { *(.stab.exclstr) }
140  .stab.index 0 : { *(.stab.index) }
141  .stab.indexstr 0 : { *(.stab.indexstr) }
142  .comment 0 : { *(.comment) }
143
144  /* DWARF debug sections.
145     Symbols in the DWARF debugging sections are relative to the beginning
146     of the section so we begin them at 0.  */
147  /* DWARF 1 */
148  .debug          0 : { *(.debug) }
149  .line           0 : { *(.line) }
150 
151  /* GNU DWARF 1 extensions */
152  .debug_srcinfo  0 : { *(.debug_srcinfo) }
153  .debug_sfnames  0 : { *(.debug_sfnames) }
154 
155  /* DWARF 1.1 and DWARF 2 */
156  .debug_aranges  0 : { *(.debug_aranges) }
157  .debug_pubnames 0 : { *(.debug_pubnames) }
158 
159  /* DWARF 2 */
160  .debug_info     0 : { *(.debug_info) }
161  .debug_abbrev   0 : { *(.debug_abbrev) }
162  .debug_line     0 : { *(.debug_line) }
163  .debug_frame    0 : { *(.debug_frame) }
164  .debug_str      0 : { *(.debug_str) }
165  .debug_loc      0 : { *(.debug_loc) }
166  .debug_macinfo  0 : { *(.debug_macinfo) }
167 
168  /* SGI/MIPS DWARF 2 extensions */
169  .debug_weaknames 0 : { *(.debug_weaknames) }
170  .debug_funcnames 0 : { *(.debug_funcnames) }
171  .debug_typenames 0 : { *(.debug_typenames) }
172  .debug_varnames  0 : { *(.debug_varnames) }
173  /* These must appear regardless of  .  */
174}
Note: See TracBrowser for help on using the repository browser.