source: trunk/libs/newlib/src/libgloss/mips/array.ld @ 532

Last change on this file since 532 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 4.4 KB
RevLine 
[444]1/*
2 * memory map assumed by prom and standalone system
3 *
4 * physical     kseg1                   use
5 *
6 * 0x1fc20000   0xbfc20000
7 * to                                   prom text and read-only data
8 * 0x1fc00000   0xbfc00000              (in cpu board "prom space")
9 *
10 * (Top of RAM - 8K) downward           sash and standalone program stack
11 *              |                       ( - 8K to preserve kernel message bufs)
12 *              V                       (standalone programs grow their stack
13 *                                       immediately below sash's stack)
14 *
15 *              ^
16 *              |
17 * 0x00100000   0xa0100000 upward       sash program text, data, and bss
18 *
19 *              ^
20 *              |
21 * 0x00020000   0xa0020000 upward       standalone program text, data, and bss
22 *                                      (kernel is loaded here, also)
23 *
24 * 0x0001ffff   0xa001ffff downward     dbgmon stack
25 *              |
26 *              V
27 *
28 *              ^
29 *              |
30 * 0x00010000   0xa0010000 upward       dbgmon text, data, and bss
31 *
32 * 0x0000ffff   0xa000ffff downward     prom monitor stack
33 *              |
34 *              V
35 *
36 *              ^
37 *              |
38 * 0x00000500   0xa0000500 upward       prom monitor bss
39 *
40 * 0x000004ff   0xa00004ff
41 * to                                   restart block
42 * 0x00000400   0xa0000400
43 *
44 * 0x000003ff   0xa00003ff
45 * to                                   general exception code
46 * 0x00000080   0xa0000080              (note cpu addresses as 0x80000080!)
47 *
48 * 0x0000007f   0xa000007f
49 * to                                   utlbmiss exception code
50 * 0x00000000   0xa0000000              (note cpu addresses as 0x80000000!)
51 */
52
53/* Uncomment this if you want srecords.
54OUTPUT_FORMAT(srec)
55 */
56ENTRY(start)
57STARTUP(crt0.o)
58INPUT(array.o)
59SEARCH_DIR(.)
60__DYNAMIC  =  0;
61
62/*
63 * Allocate the stack to be at the top of memory, since the stack
64 * grows down
65 *
66PROVIDE (__stack = 1M - 8);
67 */
68
69/*
70 * Initalize some symbols to be zero so we can reference them in the
71 * crt0 without core dumping. These functions are all optional, but
72 * we do this so we can have our crt0 always use them if they exist.
73 * This is so BSPs work better when using the crt0 installed with gcc.
74 * We have to initalize them twice, so we multiple object file
75 * formats, as some prepend an underscore.
76 */
77PROVIDE (hardware_exit_hook = 0);
78PROVIDE (hardware_hazard_hook = 0);
79PROVIDE (hardware_init_hook = 0);
80PROVIDE (software_init_hook = 0);
81
82SECTIONS
83{       
84  . = 0x80020000;
85  .text : {
86     _ftext = . ;
87    KEEP (*(.init))
88     eprol  =  .;
89    *(.text)
90    *(.text.*)
91    *(.gnu.linkonce.t.*)
92    *(.mips16.fn.*)
93    *(.mips16.call.*)
94    PROVIDE (__runtime_reloc_start = .);
95    *(.rel.sdata)
96    PROVIDE (__runtime_reloc_stop = .);
97    KEEP (*(.fini))
98     etext  =  .;
99     _etext  =  .;
100  }
101 
102  .eh_frame_hdr : { *(.eh_frame_hdr) }
103  .eh_frame : { KEEP (*(.eh_frame)) }
104  .gcc_except_table : { *(.gcc_except_table) }
105  .jcr : { KEEP (*(.jcr)) }
106  .ctors    :
107  {
108    /* gcc uses crtbegin.o to find the start of
109       the constructors, so we make sure it is
110       first.  Because this is a wildcard, it
111       doesn't matter if the user does not
112       actually link against crtbegin.o; the
113       linker won't look for a file to match a
114       wildcard.  The wildcard also means that it
115       doesn't matter which directory crtbegin.o
116       is in.  */
117
118    KEEP (*crtbegin.o(.ctors))
119
120    /* We don't want to include the .ctor section from
121       from the crtend.o file until after the sorted ctors.
122       The .ctor section from the crtend file contains the
123       end of ctors marker and it must be last */
124
125    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
126    KEEP (*(SORT(.ctors.*)))
127    KEEP (*(.ctors))
128  }
129
130  .dtors    :
131  {
132    KEEP (*crtbegin.o(.dtors))
133    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
134    KEEP (*(SORT(.dtors.*)))
135    KEEP (*(.dtors))
136  }
137
138  . = .;
139  .rdata : {
140    *(.rdata)
141    *(.rodata)
142    *(.rodata.*)
143    *(.gnu.linkonce.r.*)
144  }
145   _fdata = ALIGN(16);
146  .data : {
147    *(.data)
148    *(.data.*)
149    *(.gnu.linkonce.d.*)
150  }
151   _gp = ALIGN(16) + 0x8000;
152  .lit8 : {
153    *(.lit8)
154  }
155  .lit4 : {
156    *(.lit4)
157  }
158  .sdata : {
159    *(.sdata)
160    *(.sdata.*)
161    *(.gnu.linkonce.s.*)
162  }
163   edata  =  .;
164   _edata  =  .;
165   _fbss = .;
166  .sbss : {
167    *(.sbss)
168    *(.sbss.*)
169    *(.gnu.linkonce.sb.*)
170    *(.scommon)
171  }
172  .bss : {
173    _bss_start = . ;
174    *(.bss)
175    *(.bss.*)
176    *(.gnu.linkonce.b.*)
177    *(COMMON)
178  }
179   end = .;
180   _end = .;
181}
Note: See TracBrowser for help on using the repository browser.