Commit | Line | Data |
---|---|---|
c906108c SS |
1 | OUTPUT_FORMAT("elf32-d10v", "elf32-d10v", |
2 | "elf32-d10v") | |
3 | OUTPUT_ARCH(d10v) | |
4 | ENTRY(_start) | |
c906108c SS |
5 | /* Do we need any of these for elf? |
6 | __DYNAMIC = 0; */ | |
99a8512b MS |
7 | |
8 | MEMORY | |
9 | { | |
10 | UNIFIED : org = 0, len = 0x1000000 | |
11 | INSN : org = 0x1014000, len = 0x40000 | |
12 | DATA : org = 0x2000004, len = 0x7FFC | |
13 | STACK : org = 0x200BFFE, len = 4 | |
14 | } | |
15 | ||
c906108c SS |
16 | SECTIONS |
17 | { | |
18 | /* Overlay sections: */ | |
99a8512b MS |
19 | .ovly0 0x1001000 : AT (0x8000) { foo.o(.text) } |
20 | .ovly1 0x1001000 : AT (0x9000) { bar.o(.text) } | |
21 | .ovly2 0x1002000 : AT (0xa000) { baz.o(.text) } | |
22 | .ovly3 0x1002000 : AT (0xb000) { grbx.o(.text) } | |
23 | .data00 0x2001000 : AT (0xc000) { foo.o(.data) } | |
24 | .data01 0x2001000 : AT (0xd000) { bar.o(.data) } | |
25 | .data02 0x2002000 : AT (0xe000) { baz.o(.data) } | |
26 | .data03 0x2002000 : AT (0xf000) { grbx.o(.data) } | |
27 | ||
28 | .text : | |
29 | { | |
30 | KEEP (*(.init)) | |
31 | KEEP (*(.init.*)) | |
32 | KEEP (*(.fini)) | |
33 | KEEP (*(.fini.*)) | |
34 | *(.text) | |
35 | *(.text.*) | |
36 | /* .gnu.warning sections are handled specially by elf32.em. */ | |
37 | *(.gnu.warning) | |
38 | *(.gnu.linkonce.t*) | |
39 | _etext = .; | |
40 | PROVIDE (etext = .); | |
41 | } >INSN =0 | |
42 | .rodata : { | |
43 | *(.rodata) | |
44 | *(.gnu.linkonce.r*) | |
45 | *(.rodata.*) | |
46 | } >DATA | |
47 | .rodata1 : { | |
48 | *(.rodata1) | |
49 | *(.rodata1.*) | |
50 | } >DATA | |
51 | ||
c906108c SS |
52 | .data : |
53 | { | |
54 | *(.data) | |
99a8512b | 55 | *(.data.*) |
c906108c SS |
56 | *(.gnu.linkonce.d*) |
57 | _ovly_table = .; | |
58 | LONG(ABSOLUTE(ADDR(.ovly0))); | |
59 | LONG(SIZEOF(.ovly0)); | |
60 | LONG(LOADADDR(.ovly0)); | |
61 | LONG(0); | |
62 | LONG(ABSOLUTE(ADDR(.ovly1))); | |
63 | LONG(SIZEOF(.ovly1)); | |
64 | LONG(LOADADDR(.ovly1)); | |
65 | LONG(0); | |
66 | LONG(ABSOLUTE(ADDR(.ovly2))); | |
67 | LONG(SIZEOF(.ovly2)); | |
68 | LONG(LOADADDR(.ovly2)); | |
69 | LONG(0); | |
70 | LONG(ABSOLUTE(ADDR(.ovly3))); | |
71 | LONG(SIZEOF(.ovly3)); | |
72 | LONG(LOADADDR(.ovly3)); | |
73 | LONG(0); | |
74 | LONG(ABSOLUTE(ADDR(.data00))); | |
75 | LONG(SIZEOF(.data00)); | |
76 | LONG(LOADADDR(.data00)); | |
77 | LONG(0); | |
78 | LONG(ABSOLUTE(ADDR(.data01))); | |
79 | LONG(SIZEOF(.data01)); | |
80 | LONG(LOADADDR(.data01)); | |
81 | LONG(0); | |
82 | LONG(ABSOLUTE(ADDR(.data02))); | |
83 | LONG(SIZEOF(.data02)); | |
84 | LONG(LOADADDR(.data02)); | |
85 | LONG(0); | |
86 | LONG(ABSOLUTE(ADDR(.data03))); | |
87 | LONG(SIZEOF(.data03)); | |
88 | LONG(LOADADDR(.data03)); | |
89 | LONG(0); | |
90 | _novlys = .; | |
91 | LONG((_novlys - _ovly_table) / 16); | |
92 | CONSTRUCTORS | |
99a8512b MS |
93 | } >DATA |
94 | .data1 : { | |
95 | *(.data1) | |
96 | *(.data1.*) | |
97 | } >DATA | |
c906108c SS |
98 | .ctors : |
99 | { | |
99a8512b MS |
100 | /* gcc uses crtbegin.o to find the start of |
101 | the constructors, so we make sure it is | |
102 | first. Because this is a wildcard, it | |
103 | doesn't matter if the user does not | |
104 | actually link against crtbegin.o; the | |
105 | linker won't look for a file to match a | |
106 | wildcard. The wildcard also means that it | |
107 | doesn't matter which directory crtbegin.o | |
108 | is in. */ | |
109 | ||
110 | KEEP (*crtbegin.o(.ctors)) | |
111 | ||
112 | /* We don't want to include the .ctor section from | |
113 | from the crtend.o file until after the sorted ctors. | |
114 | The .ctor section from the crtend file contains the | |
115 | end of ctors marker and it must be last */ | |
116 | ||
117 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) | |
118 | KEEP (*(SORT(.ctors.*))) | |
119 | KEEP (*(.ctors)) | |
120 | } >DATA | |
c906108c SS |
121 | .dtors : |
122 | { | |
99a8512b MS |
123 | KEEP (*crtbegin.o(.dtors)) |
124 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) | |
125 | KEEP (*(SORT(.dtors.*))) | |
126 | KEEP (*(.dtors)) | |
127 | } >DATA | |
c906108c SS |
128 | /* We want the small data sections together, so single-instruction offsets |
129 | can access them all, and initialized data all before uninitialized, so | |
130 | we can shorten the on-disk segment size. */ | |
99a8512b MS |
131 | .sdata : { |
132 | *(.sdata) | |
133 | *(.sdata.*) | |
134 | } >DATA | |
c906108c SS |
135 | _edata = .; |
136 | PROVIDE (edata = .); | |
137 | __bss_start = .; | |
99a8512b | 138 | .sbss : { *(.sbss) *(.scommon) } >DATA |
c906108c SS |
139 | .bss : |
140 | { | |
141 | *(.dynbss) | |
99a8512b | 142 | *(.dynbss.*) |
c906108c | 143 | *(.bss) |
99a8512b | 144 | *(.bss.*) |
c906108c | 145 | *(COMMON) |
99a8512b MS |
146 | } >DATA |
147 | ||
c906108c SS |
148 | _end = . ; |
149 | PROVIDE (end = .); | |
99a8512b MS |
150 | |
151 | .stack : { _stack = .; *(.stack) } >STACK | |
152 | ||
c906108c SS |
153 | /* Stabs debugging sections. */ |
154 | .stab 0 : { *(.stab) } | |
155 | .stabstr 0 : { *(.stabstr) } | |
156 | .stab.excl 0 : { *(.stab.excl) } | |
157 | .stab.exclstr 0 : { *(.stab.exclstr) } | |
158 | .stab.index 0 : { *(.stab.index) } | |
159 | .stab.indexstr 0 : { *(.stab.indexstr) } | |
99a8512b | 160 | |
c906108c | 161 | .comment 0 : { *(.comment) } |
99a8512b | 162 | |
c906108c | 163 | /* DWARF debug sections. |
99a8512b MS |
164 | Symbols in the DWARF debugging sections are relative to the beginning |
165 | of the section so we begin them at 0. */ | |
166 | ||
167 | /* DWARF 1 */ | |
c906108c | 168 | .debug 0 : { *(.debug) } |
99a8512b MS |
169 | .line 0 : { *(.line) } |
170 | ||
171 | /* GNU DWARF 1 extensions */ | |
c906108c | 172 | .debug_srcinfo 0 : { *(.debug_srcinfo) } |
99a8512b MS |
173 | .debug_sfnames 0 : { *(.debug_sfnames) } |
174 | ||
175 | /* DWARF 1.1 and DWARF 2 */ | |
c906108c SS |
176 | .debug_aranges 0 : { *(.debug_aranges) } |
177 | .debug_pubnames 0 : { *(.debug_pubnames) } | |
99a8512b MS |
178 | |
179 | /* DWARF 2 */ | |
180 | .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) } | |
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) } | |
c906108c | 193 | } |