CORE: reorganized so the EX actually happens in EX and not DE
[yari.git] / testcases / sram.ld
blob8571db49efad088245745360bb48406f8b16f9a3
1 /*
2  * Link for running from SRAM
3  *
4  * This linker script was based on the nullmon.ld from the libgloss
5  * (newlib) distribution.
6  *
7  * Memory map:
8  *
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
15  *
16  * #BFC0_0000 - #BFC0_3FFF PROM (16KiB)
17  * #BFC0_4000 - #FEFF_FFFF Unmapped
18  *
19  * #FF00_0000 - #FF??_???? IO space
20  *
21  * Handwired entrypoints:
22  * #BFC00000 Reset vector
23  * #BFC00380 Exception handling
24  */
26 /* The following TEXT start address leaves space for the monitor
27    workspace. */
29 ENTRY(_start)
30 /*STARTUP(crt0.o)*/
31 OUTPUT_ARCH("mips:3000")
32 OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-littlemips")
33 /*GROUP(-lc -lmymips -lgcc)*/
34 SEARCH_DIR(.)
35 __DYNAMIC  =  0;
38  * Allocate the stack to be at the top of memory, since the stack
39  * grows down
40  */
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.
51  */
52 PROVIDE (hardware_exit_hook = 0);
53 PROVIDE (hardware_hazard_hook = 0);
54 PROVIDE (hardware_init_hook = 0);
55 PROVIDE (software_init_hook = 0);
57 SECTIONS
59   . = 0x40000000;
60   .text : {
61      _ftext = . ;
62     *(.startup_code)
63     *(.init)
64      eprol  =  .;
65     *(.text)
66     *(.text.*)
67     *(.gnu.linkonce.t*)
68     *(.mips16.fn.*)
69     *(.mips16.call.*)
70     PROVIDE (__runtime_reloc_start = .);
71     *(.rel.sdata)
72     PROVIDE (__runtime_reloc_stop = .);
73     *(.fini)
74      etext  =  .;
75      _etext  =  .;
76   }
78   . = .;
79   .rodata : {
80     *(.rdata)
81     *(.rodata)
82     *(.rodata.*)
83     *(.gnu.linkonce.r*)
84   }
86    _fdata = ALIGN(16);
87   .data : {
88     *(.data)
89     *(.data.*)
90     *(.gnu.linkonce.d*)
91   }
92   . = ALIGN(8);
93   _gp = . /* + 0x8000*/;
94   __global = _gp;
95   .lit8 : {
96     *(.lit8)
97   }
98   .lit4 : {
99     *(.lit4)
100   }
101   .sdata : {
102     *(.sdata)
103     *(.sdata.*)
104     *(.gnu.linkonce.s*)
105   }
106   . = ALIGN(4);
107    edata  =  .;
108    _edata  =  .;
109    _fbss = .;
110   .sbss : {
111     *(.sbss)
112     *(.scommon)
113   }
114   .bss : {
115     _bss_start = . ;
116     *(.bss)
117     *(COMMON)
118   }
119    . = ALIGN(64) ;
120    end = .;
121    _end = .;