1 /* Linker script forJMR 3904 board */
5 OUTPUT_ARCH("mips:3000")
6 OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-littlemips")
7 GROUP(-lc -ljmr3904 -lgcc)
11 PROVIDE (_mem_size = 0x100000); /* JMR3904 comes as standard with 512k of RAM */
13 /* PROVIDE (__global = 0); */
16 * Initalize some symbols to be zero so we can reference them in the
17 * crt0 without core dumping. These functions are all optional, but
18 * we do this so we can have our crt0 always use them if they exist.
19 * This is so BSPs work better when using the crt0 installed with gcc.
20 * We have to initalize them twice, so we multiple object file
21 * formats, as some prepend an underscore.
23 PROVIDE (hardware_exit_hook = 0);
24 PROVIDE (hardware_hazard_hook = 0);
25 PROVIDE (hardware_init_hook = 0);
26 PROVIDE (software_init_hook = 0);
31 /* This is NOT the address which fits with the monitor from jmr. */
32 /* It fits the Cygmon ROMS */
42 PROVIDE (__runtime_reloc_start = .);
44 PROVIDE (__runtime_reloc_stop = .);
52 /* gcc uses crtbegin.o to find the start of
53 the constructors, so we make sure it is
54 first. Because this is a wildcard, it
55 doesn't matter if the user does not
56 actually link against crtbegin.o; the
57 linker won't look for a file to match a
58 wildcard. The wildcard also means that it
59 doesn't matter which directory crtbegin.o
62 KEEP (*crtbegin.o(.ctors))
64 /* We don't want to include the .ctor section from
65 from the crtend.o file until after the sorted ctors.
66 The .ctor section from the crtend file contains the
67 end of ctors marker and it must be last */
69 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
70 KEEP (*(SORT(.ctors.*)))
76 KEEP (*crtbegin.o(.dtors))
77 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
78 KEEP (*(SORT(.dtors.*)))
121 . += 0x2000 ; /* 8k bytes of stack. */
122 __stack = ALIGN(64) ;
129 /* DWARF debug sections.
130 Symbols in the DWARF debugging sections are relative to
131 the beginning of the section so we begin them at 0. */
134 .debug 0 : { *(.debug) }
135 .line 0 : { *(.line) }
137 /* GNU DWARF 1 extensions */
138 .debug_srcinfo 0 : { *(.debug_srcinfo) }
139 .debug_sfnames 0 : { *(.debug_sfnames) }
141 /* DWARF 1.1 and DWARF 2 */
142 .debug_aranges 0 : { *(.debug_aranges) }
143 .debug_pubnames 0 : { *(.debug_pubnames) }
146 .debug_info 0 : { *(.debug_info) }
147 .debug_abbrev 0 : { *(.debug_abbrev) }
148 .debug_line 0 : { *(.debug_line) }
149 .debug_frame 0 : { *(.debug_frame) }
150 .debug_str 0 : { *(.debug_str) }
151 .debug_loc 0 : { *(.debug_loc) }
152 .debug_macinfo 0 : { *(.debug_macinfo) }
154 /* SGI/MIPS DWARF 2 extensions */
155 .debug_weaknames 0 : { *(.debug_weaknames) }
156 .debug_funcnames 0 : { *(.debug_funcnames) }
157 .debug_typenames 0 : { *(.debug_typenames) }
158 .debug_varnames 0 : { *(.debug_varnames) }