1 | /* |
---|
2 | * This file contains directives for the GNU linker which are specific |
---|
3 | * to the Ethernet-Comm Board |
---|
4 | * |
---|
5 | * $Id$ |
---|
6 | */ |
---|
7 | |
---|
8 | OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", |
---|
9 | "elf32-powerpc") |
---|
10 | OUTPUT_ARCH(powerpc) |
---|
11 | SEARCH_DIR(/usr/local/powerpc-rtems/lib); |
---|
12 | |
---|
13 | ENTRY(start) |
---|
14 | |
---|
15 | MEMORY |
---|
16 | { |
---|
17 | ram : org = 0x0, l = 4M |
---|
18 | dpram : org = 0xff000000, l = 16K |
---|
19 | canbus : org = 0xff100000, l = 12K |
---|
20 | flash : org = 0xfff00000, l = 512K |
---|
21 | } |
---|
22 | |
---|
23 | |
---|
24 | SECTIONS |
---|
25 | { |
---|
26 | .vectors : |
---|
27 | { |
---|
28 | *(.vectors) |
---|
29 | } >ram |
---|
30 | |
---|
31 | /* |
---|
32 | * The stack will live in this area - between the vectors and |
---|
33 | * the text section. |
---|
34 | */ |
---|
35 | |
---|
36 | .text 0x10000: |
---|
37 | { |
---|
38 | text.start = .; |
---|
39 | *(.entry) |
---|
40 | *(.entry2) |
---|
41 | *(.text) |
---|
42 | *(.rodata) |
---|
43 | *(.gnu.linkonce.r*) |
---|
44 | *(.rodata1) |
---|
45 | *(.gnu.linkonce.t.*) |
---|
46 | *(.descriptors) |
---|
47 | /* .gnu.warning sections are handled specially by elf32.em. */ |
---|
48 | *(.gnu.warning) |
---|
49 | *(rom_ver) |
---|
50 | etext = ALIGN(0x10); |
---|
51 | _etext = .; |
---|
52 | |
---|
53 | __CTOR_LIST__ = .; |
---|
54 | LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2) |
---|
55 | *(.ctors) |
---|
56 | LONG(0) |
---|
57 | __CTOR_END__ = .; |
---|
58 | |
---|
59 | __DTOR_LIST__ = .; |
---|
60 | LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2) |
---|
61 | *(.dtors) |
---|
62 | LONG(0) |
---|
63 | __DTOR_END__ = .; |
---|
64 | |
---|
65 | *(.lit) |
---|
66 | *(.shdata) |
---|
67 | .init : { _init = .; *(.init) } |
---|
68 | .fini : { _fini = .; *(.fini) } |
---|
69 | _endtext = .; |
---|
70 | text.end = .; |
---|
71 | } > ram |
---|
72 | |
---|
73 | /* R/W Data */ |
---|
74 | .data : |
---|
75 | { |
---|
76 | *(.data) |
---|
77 | *(.data1) |
---|
78 | *(.gnu.linkonce.d.*) |
---|
79 | PROVIDE (__SDATA_START__ = .); |
---|
80 | *(.sdata) |
---|
81 | } > ram |
---|
82 | |
---|
83 | PROVIDE (__EXCEPT_START__ = .); |
---|
84 | .gcc_except_table : { *(.gcc_except_table) } >RAM |
---|
85 | PROVIDE (__EXCEPT_END__ = .); |
---|
86 | __GOT_START__ = .; |
---|
87 | .got : |
---|
88 | { |
---|
89 | s.got = .; |
---|
90 | *(.got.plt) *(.got) |
---|
91 | } > ram |
---|
92 | __GOT_END__ = .; |
---|
93 | |
---|
94 | .got1 : { *(.got1) } >ram |
---|
95 | PROVIDE (__GOT2_START__ = .); |
---|
96 | PROVIDE (_GOT2_START_ = .); |
---|
97 | .got2 : { *(.got2) } >ram |
---|
98 | PROVIDE (__GOT2_END__ = .); |
---|
99 | PROVIDE (_GOT2_END_ = .); |
---|
100 | |
---|
101 | PROVIDE (__FIXUP_START__ = .); |
---|
102 | PROVIDE (_FIXUP_START_ = .); |
---|
103 | .fixup : { *(.fixup) } >ram |
---|
104 | PROVIDE (_FIXUP_END_ = .); |
---|
105 | PROVIDE (__FIXUP_END__ = .); |
---|
106 | |
---|
107 | PROVIDE (__SDATA2_START__ = .); |
---|
108 | .sdata2 : { *(.sdata2) } >ram |
---|
109 | .sbss2 : { *(.sbss2) } >ram |
---|
110 | PROVIDE (__SBSS2_END__ = .); |
---|
111 | |
---|
112 | .sbss2 : { *(.sbss2) } >ram |
---|
113 | PROVIDE (__SBSS2_END__ = .); |
---|
114 | |
---|
115 | __SBSS_START__ = .; |
---|
116 | .bss : |
---|
117 | { |
---|
118 | bss.start = .; |
---|
119 | *(.bss) *(.sbss) *(COMMON) |
---|
120 | . = ALIGN(4); |
---|
121 | bss.end = .; |
---|
122 | } > ram |
---|
123 | __SBSS_END__ = .; |
---|
124 | |
---|
125 | bss.size = bss.end - bss.start; |
---|
126 | text.size = text.end - text.start; |
---|
127 | PROVIDE(_end = bss.end); |
---|
128 | /* |
---|
129 | * Interrupt stack setup |
---|
130 | */ |
---|
131 | |
---|
132 | IntrStack_start = ALIGN(0x10); |
---|
133 | . += 0x4000; |
---|
134 | intrStack = .; |
---|
135 | PROVIDE(intrStackPtr = intrStack); |
---|
136 | |
---|
137 | dpram : |
---|
138 | { |
---|
139 | m8xx = .; |
---|
140 | _m8xx = .; |
---|
141 | . += (8 * 1024); |
---|
142 | } >dpram |
---|
143 | |
---|
144 | canbus : |
---|
145 | { |
---|
146 | canbus0 = .; |
---|
147 | . += (0x1000); |
---|
148 | canbus1 = .; |
---|
149 | . += (0x1000); |
---|
150 | canbus2 = .; |
---|
151 | . += (0x1000); |
---|
152 | } >canbus |
---|
153 | |
---|
154 | |
---|
155 | /* Stabs debugging sections. */ |
---|
156 | .stab 0 : { *(.stab) } |
---|
157 | .stabstr 0 : { *(.stabstr) } |
---|
158 | .stab.excl 0 : { *(.stab.excl) } |
---|
159 | .stab.exclstr 0 : { *(.stab.exclstr) } |
---|
160 | .stab.index 0 : { *(.stab.index) } |
---|
161 | .stab.indexstr 0 : { *(.stab.indexstr) } |
---|
162 | .comment 0 : { *(.comment) } |
---|
163 | |
---|
164 | /* DWARF debug sections. |
---|
165 | Symbols in the DWARF debugging sections are relative to the beginning |
---|
166 | of the section so we begin them at 0. */ |
---|
167 | /* DWARF 1 */ |
---|
168 | .debug 0 : { *(.debug) } |
---|
169 | .line 0 : { *(.line) } |
---|
170 | |
---|
171 | /* GNU DWARF 1 extensions */ |
---|
172 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
---|
173 | .debug_sfnames 0 : { *(.debug_sfnames) } |
---|
174 | |
---|
175 | /* DWARF 1.1 and DWARF 2 */ |
---|
176 | .debug_aranges 0 : { *(.debug_aranges) } |
---|
177 | .debug_pubnames 0 : { *(.debug_pubnames) } |
---|
178 | |
---|
179 | /* DWARF 2 */ |
---|
180 | .debug_info 0 : { *(.debug_info) } |
---|
181 | .debug_abbrev 0 : { *(.debug_abbrev) } |
---|
182 | .debug_line 0 : { *(.debug_line) } |
---|
183 | .debug_frame 0 : { *(.debug_frame) } |
---|
184 | .debug_str 0 : { *(.debug_str) } |
---|
185 | .debug_loc 0 : { *(.debug_loc) } |
---|
186 | .debug_macinfo 0 : { *(.debug_macinfo) } |
---|
187 | |
---|
188 | /* SGI/MIPS DWARF 2 extensions */ |
---|
189 | .debug_weaknames 0 : { *(.debug_weaknames) } |
---|
190 | .debug_funcnames 0 : { *(.debug_funcnames) } |
---|
191 | .debug_typenames 0 : { *(.debug_typenames) } |
---|
192 | .debug_varnames 0 : { *(.debug_varnames) } |
---|
193 | /* These must appear regardless of . */ |
---|
194 | |
---|
195 | } |
---|