]>
Commit | Line | Data |
---|---|---|
03261851 RK |
1 | /* Linker script for Densan DVE-R3900/20A board */ |
2 | ||
3 | ENTRY(_start) | |
710c0fc4 | 4 | STARTUP(crt0.o) |
03261851 RK |
5 | OUTPUT_ARCH("mips:3000") |
6 | OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-littlemips") | |
7 | GROUP(-lc -ldve -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 | */ | |
451e4528 JJ |
26 | PROVIDE (hardware_exit_hook = 0); |
27 | PROVIDE (hardware_hazard_hook = 0); | |
03261851 RK |
28 | PROVIDE (hardware_init_hook = 0); |
29 | PROVIDE (software_init_hook = 0); | |
30 | ||
31 | SECTIONS | |
32 | { | |
33 | . = 0xA0040000; | |
34 | .text : { | |
35 | _ftext = . ; | |
36 | *(.init) | |
37 | eprol = .; | |
38 | *(.text) | |
39 | *(.text.*) | |
40 | *(.gnu.linkonce.t*) | |
41 | *(.mips16.fn.*) | |
42 | *(.mips16.call.*) | |
43 | PROVIDE (__runtime_reloc_start = .); | |
44 | *(.rel.sdata) | |
45 | PROVIDE (__runtime_reloc_stop = .); | |
46 | *(.fini) | |
47 | etext = .; | |
48 | _etext = .; | |
49 | } | |
50 | ||
51 | .ctors : | |
52 | { | |
53 | /* gcc uses crtbegin.o to find the start of | |
54 | the constructors, so we make sure it is | |
55 | first. Because this is a wildcard, it | |
56 | doesn't matter if the user does not | |
57 | actually link against crtbegin.o; the | |
58 | linker won't look for a file to match a | |
59 | wildcard. The wildcard also means that it | |
60 | doesn't matter which directory crtbegin.o | |
61 | is in. */ | |
62 | ||
63 | KEEP (*crtbegin.o(.ctors)) | |
64 | ||
65 | /* We don't want to include the .ctor section from | |
66 | from the crtend.o file until after the sorted ctors. | |
67 | The .ctor section from the crtend file contains the | |
68 | end of ctors marker and it must be last */ | |
69 | ||
70 | KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors)) | |
71 | KEEP (*(SORT(.ctors.*))) | |
72 | KEEP (*(.ctors)) | |
73 | } | |
74 | ||
75 | .dtors : | |
76 | { | |
77 | KEEP (*crtbegin.o(.dtors)) | |
78 | KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors)) | |
79 | KEEP (*(SORT(.dtors.*))) | |
80 | KEEP (*(.dtors)) | |
81 | } | |
82 | ||
83 | . = .; | |
84 | .rodata : { | |
85 | *(.rdata) | |
86 | *(.rodata) | |
87 | *(.rodata.*) | |
88 | *(.gnu.linkonce.r*) | |
89 | } | |
90 | _fdata = ALIGN(16); | |
91 | .data : { | |
92 | *(.data) | |
93 | *(.data.*) | |
94 | *(.gnu.linkonce.d*) | |
95 | CONSTRUCTORS | |
96 | } | |
97 | . = ALIGN(8); | |
98 | _gp = . + 0x8000; | |
99 | __global = _gp; | |
100 | .lit8 : { | |
101 | *(.lit8) | |
102 | } | |
103 | .lit4 : { | |
104 | *(.lit4) | |
105 | } | |
106 | .sdata : { | |
107 | *(.sdata) | |
108 | *(.sdata.*) | |
109 | *(.gnu.linkonce.s*) | |
110 | } | |
111 | . = ALIGN(4); | |
112 | edata = .; | |
113 | _edata = .; | |
114 | _fbss = .; | |
115 | .sbss : { | |
116 | *(.sbss) | |
117 | *(.scommon) | |
118 | } | |
119 | .bss : { | |
120 | _bss_start = . ; | |
121 | *(.bss) | |
122 | *(COMMON) | |
123 | } | |
124 | ||
125 | end = .; | |
126 | _end = .; | |
127 | ||
128 | /* DWARF debug sections. | |
129 | Symbols in the DWARF debugging sections are relative to | |
130 | the beginning of the section so we begin them at 0. */ | |
131 | ||
132 | /* DWARF 1 */ | |
133 | .debug 0 : { *(.debug) } | |
134 | .line 0 : { *(.line) } | |
135 | ||
136 | /* GNU DWARF 1 extensions */ | |
137 | .debug_srcinfo 0 : { *(.debug_srcinfo) } | |
138 | .debug_sfnames 0 : { *(.debug_sfnames) } | |
139 | ||
140 | /* DWARF 1.1 and DWARF 2 */ | |
141 | .debug_aranges 0 : { *(.debug_aranges) } | |
142 | .debug_pubnames 0 : { *(.debug_pubnames) } | |
143 | ||
144 | /* DWARF 2 */ | |
145 | .debug_info 0 : { *(.debug_info) } | |
146 | .debug_abbrev 0 : { *(.debug_abbrev) } | |
147 | .debug_line 0 : { *(.debug_line) } | |
148 | .debug_frame 0 : { *(.debug_frame) } | |
149 | .debug_str 0 : { *(.debug_str) } | |
150 | .debug_loc 0 : { *(.debug_loc) } | |
151 | .debug_macinfo 0 : { *(.debug_macinfo) } | |
152 | ||
153 | /* SGI/MIPS DWARF 2 extensions */ | |
154 | .debug_weaknames 0 : { *(.debug_weaknames) } | |
155 | .debug_funcnames 0 : { *(.debug_funcnames) } | |
156 | .debug_typenames 0 : { *(.debug_typenames) } | |
157 | .debug_varnames 0 : { *(.debug_varnames) } | |
158 | } |