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