BUGFIX - CPI off by a factor of 10 X
[yari.git] / testcases / prom.ld
blob698e2203da746c2c79eb39172a2b72abbf49667a
1 /*
2  * This linker script was based on the nullmon.ld from the libgloss
3  * (newlib) distribution.
4  *
5  * YARI assumes to have memory from 0x8000000
6  * onwards.  Typically 1MiB or 16MiB if SDRAM is used.
7  *
8  * The memory map:
9  *
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
16  *
17  * #BFC0_0000 - #BFC0_3FFF PROM (16KiB)
18  * #BFC0_4000 - #FEFF_FFFF Unmapped
19  *
20  * #FF00_0000 - #FF??_???? IO space
21  *
22  * Handwired entrypoints:
23  * #BFC00000 Reset vector
24  * #BFC00380 Exception handling
25  *
26  */
28 /* The following TEXT start address leaves space for the monitor
29    workspace. */
31 ENTRY(_start)
32 /*STARTUP(crt0.o)*/
33 OUTPUT_ARCH("mips:3000")
34 OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-littlemips")
35 /*GROUP(-lc -lmymips -lgcc)*/
36 SEARCH_DIR(.)
37 __DYNAMIC  =  0;
40  * Allocate the stack to be at the top of memory, since the stack
41  * grows down
42  */
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.
53  */
54 PROVIDE (hardware_exit_hook = 0);
55 PROVIDE (hardware_hazard_hook = 0);
56 PROVIDE (hardware_init_hook = 0);
57 PROVIDE (software_init_hook = 0);
59 SECTIONS
61   . = 0xBFC00000;
62   .text : {
63      _ftext = . ;
64     *(.init)
65      eprol  =  .;
66     *(.text)
67     *(.text.*)
68     *(.gnu.linkonce.t*)
69     *(.mips16.fn.*)
70     *(.mips16.call.*)
71     PROVIDE (__runtime_reloc_start = .);
72     *(.rel.sdata)
73     PROVIDE (__runtime_reloc_stop = .);
74     *(.fini)
75      etext  =  .;
76      _etext  =  .;
77   }
79   . = .;
80   .rodata : {
81     *(.rdata)
82     *(.rodata)
83     *(.rodata.*)
84     *(.gnu.linkonce.r*)
85   }
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 = .;