]>
Commit | Line | Data |
---|---|---|
1 | /* Linker script forJMR 3904 board using Java + qthreads */ | |
2 | ||
3 | ENTRY(_start) | |
4 | STARTUP(crt0.o) | |
5 | OUTPUT_ARCH("mips:3000") | |
6 | OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-littlemips") | |
7 | GROUP(-lc -ljmr3904 -lgcc -lgcjcoop) | |
8 | SEARCH_DIR(.) | |
9 | __DYNAMIC = 0; | |
10 | ||
11 | PROVIDE (_mem_size = 0x100000); /* JMR3904 comes as standard with 512k of RAM */ | |
12 | /* but this is 1 Mb */ | |
13 | ||
14 | /* Set the size of the stack for Java with qthreads. */ | |
15 | PROVIDE (_Jv_QthreadsStackSize = 0x10000); | |
16 | ||
17 | /* PROVIDE (__global = 0); */ | |
18 | ||
19 | /* | |
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. | |
26 | */ | |
27 | PROVIDE (hardware_exit_hook = 0); | |
28 | PROVIDE (hardware_hazard_hook = 0); | |
29 | PROVIDE (hardware_init_hook = 0); | |
30 | PROVIDE (software_init_hook = 0); | |
31 | ||
32 | SECTIONS | |
33 | { | |
34 | /* Load everything into DRAM, except for the stack. Put stack in SRAM */ | |
35 | . = 0x88000000; | |
36 | /* This is NOT the address which fits with the monitor from jmr. */ | |
37 | /* It fits the Cygmon ROMS */ | |
38 | .text : { | |
39 | _ftext = . ; | |
40 | KEEP (*(.init)) | |
41 | eprol = .; | |
42 | *(.text) | |
43 | *(.text.*) | |
44 | *(.gnu.linkonce.t.*) | |
45 | *(.mips16.fn.*) | |
46 | *(.mips16.call.*) | |
47 | PROVIDE (__runtime_reloc_start = .); | |
48 | *(.rel.sdata) | |
49 | PROVIDE (__runtime_reloc_stop = .); | |
50 | KEEP (*(.fini)) | |
51 | etext = .; | |
52 | _etext = .; | |
53 | } | |
54 | . = .; | |
55 | .rdata : { | |
56 | *(.rdata) | |
57 | *(.rodata) | |
58 | *(.rodata.*) | |
59 | *(.gnu.linkonce.r.*) | |
60 | } | |
61 | _fdata = ALIGN(16); | |
62 | . = _fdata; | |
63 | .data : { | |
64 | *(.data) | |
65 | *(.data.*) | |
66 | *(.gnu.linkonce.d.*) | |
67 | CONSTRUCTORS | |
68 | } | |
69 | . = ALIGN(8); | |
70 | _gp = . + 0x8000; | |
71 | __global = _gp; | |
72 | .lit8 : { | |
73 | *(.lit8) | |
74 | } | |
75 | .lit4 : { | |
76 | *(.lit4) | |
77 | } | |
78 | .sdata : { | |
79 | *(.sdata) | |
80 | *(.sdata.*) | |
81 | *(.gnu.linkonce.s.*) | |
82 | } | |
83 | . = ALIGN(4); | |
84 | edata = .; | |
85 | _edata = .; | |
86 | _fbss = .; | |
87 | .sbss : { | |
88 | *(.sbss) | |
89 | *(.sbss.*) | |
90 | *(.gnu.linkonce.sb.*) | |
91 | *(.scommon) | |
92 | } | |
93 | .bss : { | |
94 | _bss_start = . ; | |
95 | *(.bss) | |
96 | *(.bss.*) | |
97 | *(.gnu.linkonce.b.*) | |
98 | *(COMMON) | |
99 | } | |
100 | ||
101 | . = ALIGN(4); | |
102 | end = .; | |
103 | _end = .; | |
104 | ||
105 | /* Put stack in SRAM (8 Kb); this size is the same as the stack from | |
106 | the original script (when everything was in SRAM). */ | |
107 | __stack = 0x8000A000; | |
108 | ||
109 | /* DWARF debug sections. | |
110 | Symbols in the DWARF debugging sections are relative to | |
111 | the beginning of the section so we begin them at 0. */ | |
112 | ||
113 | /* DWARF 1 */ | |
114 | .debug 0 : { *(.debug) } | |
115 | .line 0 : { *(.line) } | |
116 | ||
117 | /* GNU DWARF 1 extensions */ | |
118 | .debug_srcinfo 0 : { *(.debug_srcinfo) } | |
119 | .debug_sfnames 0 : { *(.debug_sfnames) } | |
120 | ||
121 | /* DWARF 1.1 and DWARF 2 */ | |
122 | .debug_aranges 0 : { *(.debug_aranges) } | |
123 | .debug_pubnames 0 : { *(.debug_pubnames) } | |
124 | ||
125 | /* DWARF 2 */ | |
126 | .debug_info 0 : { *(.debug_info) } | |
127 | .debug_abbrev 0 : { *(.debug_abbrev) } | |
128 | .debug_line 0 : { *(.debug_line) } | |
129 | .debug_frame 0 : { *(.debug_frame) } | |
130 | .debug_str 0 : { *(.debug_str) } | |
131 | .debug_loc 0 : { *(.debug_loc) } | |
132 | .debug_macinfo 0 : { *(.debug_macinfo) } | |
133 | .debug_ranges 0 : { *(.debug_ranges) } | |
134 | ||
135 | /* SGI/MIPS DWARF 2 extensions */ | |
136 | .debug_weaknames 0 : { *(.debug_weaknames) } | |
137 | .debug_funcnames 0 : { *(.debug_funcnames) } | |
138 | .debug_typenames 0 : { *(.debug_typenames) } | |
139 | .debug_varnames 0 : { *(.debug_varnames) } | |
140 | } |