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")
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);
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.*)))