2 * Link for running from SRAM
4 * This linker script was based on the nullmon.ld from the libgloss
5 * (newlib) distribution.
9 * #0000_0000 - #7FFF_FFFF Unmapped
10 * #4000_0000 - #400F_FFFF SRAM (1MiB SRAM)
11 * #4000_0000 - #400E_0000 (896KiB, user space)
12 * #400E_6A00 - #400E_FFFF (38.4KiB normal place for the framebuffer)
13 * #400F_0000 - #400F_FFFF (64KiB, reserved for the GDB stub monitor)
14 * #4010_0000 - #BFBF_FFFF Unmapped
16 * #BFC0_0000 - #BFC0_3FFF PROM (16KiB)
17 * #BFC0_4000 - #FEFF_FFFF Unmapped
19 * #FF00_0000 - #FF??_???? IO space
21 * Handwired entrypoints:
22 * #BFC00000 Reset vector
23 * #BFC00380 Exception handling
26 /* The following TEXT start address leaves space for the monitor
31 OUTPUT_ARCH("mips:3000")
32 OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-littlemips")
33 /*GROUP(-lc -lmymips -lgcc)*/
38 * Allocate the stack to be at the top of memory, since the stack
41 PROVIDE (__stack = 0);
42 /* PROVIDE (__global = 0); */
45 * Initalize some symbols to be zero so we can reference them in the
46 * crt0 without core dumping. These functions are all optional, but
47 * we do this so we can have our crt0 always use them if they exist.
48 * This is so BSPs work better when using the crt0 installed with gcc.
49 * We have to initalize them twice, so we multiple object file
50 * formats, as some prepend an underscore.
52 PROVIDE (hardware_exit_hook = 0);
53 PROVIDE (hardware_hazard_hook = 0);
54 PROVIDE (hardware_init_hook = 0);
55 PROVIDE (software_init_hook = 0);
70 PROVIDE (__runtime_reloc_start = .);
72 PROVIDE (__runtime_reloc_stop = .);
93 _gp = . /* + 0x8000*/;