1 /* The following TEXT start address leaves space for the monitor
6 OUTPUT_ARCH("mips:4000")
7 OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-littlemips")
8 GROUP(-lc -lpmon -lgcc)
13 * Allocate the stack to be at the top of memory, since the stack
16 PROVIDE (__stack = 0);
17 /* PROVIDE (__global = 0); */
20 * Initalize some symbols to be zero so we can reference them in the
21 * crt0 without core dumping. These functions are all optional, but
22 * we do this so we can have our crt0 always use them if they exist.
23 * This is so BSPs work better when using the crt0 installed with gcc.
24 * We have to initalize them twice, so we multiple object file
25 * formats, as some prepend an underscore.
27 PROVIDE (hardware_exit_hook = 0);
28 PROVIDE (hardware_hazard_hook = 0);
29 PROVIDE (hardware_init_hook = 0);
30 PROVIDE (software_init_hook = 0);
44 PROVIDE (__runtime_reloc_start = .);
46 PROVIDE (__runtime_reloc_stop = .);
54 /* gcc uses crtbegin.o to find the start of
55 the constructors, so we make sure it is
56 first. Because this is a wildcard, it
57 doesn't matter if the user does not
58 actually link against crtbegin.o; the
59 linker won't look for a file to match a
60 wildcard. The wildcard also means that it
61 doesn't matter which directory crtbegin.o
64 KEEP (*crtbegin.o(.ctors))
66 /* We don't want to include the .ctor section from
67 from the crtend.o file until after the sorted ctors.
68 The .ctor section from the crtend file contains the
69 end of ctors marker and it must be last */
71 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
72 KEEP (*(SORT(.ctors.*)))
78 KEEP (*crtbegin.o(.dtors))
79 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
80 KEEP (*(SORT(.dtors.*)))
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. */
133 .debug 0 : { *(.debug) }
134 .line 0 : { *(.line) }
136 /* GNU DWARF 1 extensions */
137 .debug_srcinfo 0 : { *(.debug_srcinfo) }
138 .debug_sfnames 0 : { *(.debug_sfnames) }
140 /* DWARF 1.1 and DWARF 2 */
141 .debug_aranges 0 : { *(.debug_aranges) }
142 .debug_pubnames 0 : { *(.debug_pubnames) }
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) }
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) }