CORE: suppress some warnings
[yari.git] / DE2-70 / prom.ld
blob9f69a9aa2eff06ac07928d8d94ba20487aacf325
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 onwards.  Typically 1MiB or
6  * 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   }
87   . = 0x400E0000;
88    _fdata = ALIGN(16);
89   .data : {
90     *(.data)
91     *(.data.*)
92     *(.gnu.linkonce.d*)
93   }
94   . = ALIGN(8);
95   _gp = . /* + 0x8000*/;
96   __global = _gp;
97   .lit8 : {
98     *(.lit8)
99   }
100   .lit4 : {
101     *(.lit4)
102   }
103   .sdata : {
104     *(.sdata)
105     *(.sdata.*)
106     *(.gnu.linkonce.s*)
107   }
108   . = ALIGN(4);
109    edata  =  .;
110    _edata  =  .;
111    _fbss = .;
112   .sbss : {
113     *(.sbss)
114     *(.scommon)
115   }
116   .bss : {
117     _bss_start = . ;
118     *(.bss)
119     *(COMMON)
120   }
121    . = ALIGN(64) ;
122    end = .;
123    _end = .;