1 /* The following TEXT start address leaves space for the monitor
2 workspace. This linker script links isa32 programs for use with the
6 OUTPUT_ARCH("mips:isa64")
7 OUTPUT_FORMAT("elf32-littlemips", "elf32-bigmips", "elf32-littlemips")
14 * Allocate the stack to be at the top of memory, since the stack
17 PROVIDE (__stack = 0);
18 /* PROVIDE (__global = 0); */
21 * Initalize some symbols to be zero so we can reference them in the
22 * crt0 without core dumping. These functions are all optional, but
23 * we do this so we can have our crt0 always use them if they exist.
24 * This is so BSPs work better when using the crt0 installed with gcc.
25 * We have to initalize them twice, so we multiple object file
26 * formats, as some prepend an underscore.
28 PROVIDE (hardware_exit_hook = 0);
29 PROVIDE (hardware_hazard_hook = 0);
30 PROVIDE (hardware_init_hook = 0);
31 PROVIDE (software_init_hook = 0);
52 PROVIDE (__runtime_reloc_start = .);
54 PROVIDE (__runtime_reloc_stop = .);
61 /* gcc uses crtbegin.o to find the start of
62 the constructors, so we make sure it is
63 first. Because this is a wildcard, it
64 doesn't matter if the user does not
65 actually link against crtbegin.o; the
66 linker won't look for a file to match a
67 wildcard. The wildcard also means that it
68 doesn't matter which directory crtbegin.o
71 KEEP (*crtbegin.o(.ctors))
73 /* We don't want to include the .ctor section from
74 from the crtend.o file until after the sorted ctors.
75 The .ctor section from the crtend file contains the
76 end of ctors marker and it must be last */
78 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
79 KEEP (*(SORT(.ctors.*)))
85 KEEP (*crtbegin.o(.dtors))
86 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
87 KEEP (*(SORT(.dtors.*)))
135 /* DWARF debug sections.
136 Symbols in the DWARF debugging sections are relative to
137 the beginning of the section so we begin them at 0. */
140 .debug 0 : { *(.debug) }
141 .line 0 : { *(.line) }
143 /* GNU DWARF 1 extensions */
144 .debug_srcinfo 0 : { *(.debug_srcinfo) }
145 .debug_sfnames 0 : { *(.debug_sfnames) }
147 /* DWARF 1.1 and DWARF 2 */
148 .debug_aranges 0 : { *(.debug_aranges) }
149 .debug_pubnames 0 : { *(.debug_pubnames) }
152 .debug_info 0 : { *(.debug_info) }
153 .debug_abbrev 0 : { *(.debug_abbrev) }
154 .debug_line 0 : { *(.debug_line) }
155 .debug_frame 0 : { *(.debug_frame) }
156 .debug_str 0 : { *(.debug_str) }
157 .debug_loc 0 : { *(.debug_loc) }
158 .debug_macinfo 0 : { *(.debug_macinfo) }
160 /* SGI/MIPS DWARF 2 extensions */
161 .debug_weaknames 0 : { *(.debug_weaknames) }
162 .debug_funcnames 0 : { *(.debug_funcnames) }
163 .debug_typenames 0 : { *(.debug_typenames) }
164 .debug_varnames 0 : { *(.debug_varnames) }