]>
Commit | Line | Data |
---|---|---|
1 | /* The following TEXT start address leaves space for the monitor | |
2 | workspace. */ | |
3 | ||
4 | ENTRY(_start) | |
5 | STARTUP(crt0_cfe.o) | |
6 | OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-littlemips") | |
7 | GROUP(-lc -lcfe -lgcc) | |
8 | SEARCH_DIR(.) | |
9 | __DYNAMIC = 0; | |
10 | ||
11 | /* | |
12 | * Allocate the stack to be at the top of memory, since the stack | |
13 | * grows down | |
14 | */ | |
15 | PROVIDE (__stack = 0); | |
16 | /* PROVIDE (__global = 0); */ | |
17 | ||
18 | /* | |
19 | * Initalize some symbols to be zero so we can reference them in the | |
20 | * crt0 without core dumping. These functions are all optional, but | |
21 | * we do this so we can have our crt0 always use them if they exist. | |
22 | * This is so BSPs work better when using the crt0 installed with gcc. | |
23 | * We have to initalize them twice, so we multiple object file | |
24 | * formats, as some prepend an underscore. | |
25 | */ | |
26 | PROVIDE (hardware_exit_hook = 0); | |
27 | PROVIDE (hardware_hazard_hook = 0); | |
28 | PROVIDE (hardware_init_hook = 0); | |
29 | PROVIDE (software_init_hook = 0); | |
30 | ||
31 | SECTIONS | |
32 | { | |
33 | . = 0x80020000; | |
34 | .text : { | |
35 | _ftext = . ; | |
36 | PROVIDE (eprol = .); | |
37 | *(.text) | |
38 | *(.text.*) | |
39 | *(.gnu.linkonce.t.*) | |
40 | *(.mips16.fn.*) | |
41 | *(.mips16.call.*) | |
42 | } | |
43 | .init : { | |
44 | KEEP (*(.init)) | |
45 | } | |
46 | .fini : { | |
47 | KEEP (*(.fini)) | |
48 | } | |
49 | .rel.sdata : { | |
50 | PROVIDE (__runtime_reloc_start = .); | |
51 | *(.rel.sdata) | |
52 | PROVIDE (__runtime_reloc_stop = .); | |
53 | } | |
54 | PROVIDE (etext = .); | |
55 | _etext = .; | |
56 | ||
57 | .eh_frame_hdr : { *(.eh_frame_hdr) } | |
58 | .eh_frame : | |
59 | { | |
60 | /* The .eh_frame section from the crtend file contains the | |
61 | end of eh_frame marker and it must be last. */ | |
62 | KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame)) | |
63 | KEEP (*(.eh_frame)) | |
64 | } | |
65 | .gcc_except_table : { *(.gcc_except_table) } | |
66 | .jcr : { KEEP (*(.jcr)) } | |
67 | .ctors : | |
68 | { | |
69 | /* gcc uses crtbegin.o to find the start of | |
70 | the constructors, so we make sure it is | |
71 | first. Because this is a wildcard, it | |
72 | doesn't matter if the user does not | |
73 | actually link against crtbegin.o; the | |
74 | linker won't look for a file to match a | |
75 | wildcard. The wildcard also means that it | |
76 | doesn't matter which directory crtbegin.o | |
77 | is in. */ | |
78 | ||
79 | KEEP (*crtbegin.o(.ctors)) | |
80 | ||
81 | /* We don't want to include the .ctor section from | |
82 | from the crtend.o file until after the sorted ctors. | |
83 | The .ctor section from the crtend file contains the | |
84 | end of ctors marker and it must be last */ | |
85 | ||
86 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) | |
87 | KEEP (*(SORT(.ctors.*))) | |
88 | KEEP (*(.ctors)) | |
89 | } | |
90 | ||
91 | .dtors : | |
92 | { | |
93 | KEEP (*crtbegin.o(.dtors)) | |
94 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) | |
95 | KEEP (*(SORT(.dtors.*))) | |
96 | KEEP (*(.dtors)) | |
97 | } | |
98 | ||
99 | . = .; | |
100 | .rodata : { | |
101 | *(.rdata) | |
102 | *(.rodata) | |
103 | *(.rodata.*) | |
104 | *(.gnu.linkonce.r.*) | |
105 | } | |
106 | _fdata = ALIGN(16); | |
107 | . = _fdata; | |
108 | .data : { | |
109 | *(.data) | |
110 | *(.data.*) | |
111 | *(.gnu.linkonce.d.*) | |
112 | } | |
113 | . = ALIGN(8); | |
114 | _gp = . + 0x8000; | |
115 | __global = _gp; | |
116 | .lit8 : { | |
117 | *(.lit8) | |
118 | } | |
119 | .lit4 : { | |
120 | *(.lit4) | |
121 | } | |
122 | .sdata : { | |
123 | *(.sdata) | |
124 | *(.sdata.*) | |
125 | *(.gnu.linkonce.s.*) | |
126 | } | |
127 | . = ALIGN(4); | |
128 | PROVIDE (edata = .); | |
129 | _edata = .; | |
130 | _fbss = .; | |
131 | .sbss : { | |
132 | *(.sbss) | |
133 | *(.sbss.*) | |
134 | *(.gnu.linkonce.sb.*) | |
135 | *(.scommon) | |
136 | } | |
137 | .bss : { | |
138 | _bss_start = . ; | |
139 | *(.bss) | |
140 | *(.bss.*) | |
141 | *(.gnu.linkonce.b.*) | |
142 | *(COMMON) | |
143 | } | |
144 | ||
145 | . = ALIGN(32); | |
146 | PROVIDE (end = .); | |
147 | _end = .; | |
148 | ||
149 | /* DWARF debug sections. | |
150 | Symbols in the DWARF debugging sections are relative to | |
151 | the beginning of the section so we begin them at 0. */ | |
152 | ||
153 | /* DWARF 1 */ | |
154 | .debug 0 : { *(.debug) } | |
155 | .line 0 : { *(.line) } | |
156 | ||
157 | /* GNU DWARF 1 extensions */ | |
158 | .debug_srcinfo 0 : { *(.debug_srcinfo) } | |
159 | .debug_sfnames 0 : { *(.debug_sfnames) } | |
160 | ||
161 | /* DWARF 1.1 and DWARF 2 */ | |
162 | .debug_aranges 0 : { *(.debug_aranges) } | |
163 | .debug_pubnames 0 : { *(.debug_pubnames) } | |
164 | ||
165 | /* DWARF 2 */ | |
166 | .debug_info 0 : { *(.debug_info) } | |
167 | .debug_abbrev 0 : { *(.debug_abbrev) } | |
168 | .debug_line 0 : { *(.debug_line) } | |
169 | .debug_frame 0 : { *(.debug_frame) } | |
170 | .debug_str 0 : { *(.debug_str) } | |
171 | .debug_loc 0 : { *(.debug_loc) } | |
172 | .debug_macinfo 0 : { *(.debug_macinfo) } | |
173 | .debug_ranges 0 : { *(.debug_ranges) } | |
174 | ||
175 | /* SGI/MIPS DWARF 2 extensions */ | |
176 | .debug_weaknames 0 : { *(.debug_weaknames) } | |
177 | .debug_funcnames 0 : { *(.debug_funcnames) } | |
178 | .debug_typenames 0 : { *(.debug_typenames) } | |
179 | .debug_varnames 0 : { *(.debug_varnames) } | |
180 | } |