]> sourceware.org Git - newlib-cygwin.git/blob - libgloss/mips/lsi.ld
e350419e742d9b89c37096c98bceef7abc0fd574
[newlib-cygwin.git] / libgloss / mips / lsi.ld
1 /* The following TEXT start address leaves space for the monitor
2 workspace. */
3
4 ENTRY(_start)
5 STARTUP(crt0.o)
6 OUTPUT_ARCH("mips:4000")
7 OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-littlemips")
8 GROUP(-lc -llsi -lgcc)
9 SEARCH_DIR(.)
10 __DYNAMIC = 0;
11
12 /*
13 * Allocate the stack to be at the top of memory, since the stack
14 * grows down
15 */
16 PROVIDE (__stack = 0);
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 . = 0xA0020000;
35 .text : {
36 _ftext = . ;
37 KEEP (*(.init))
38 eprol = .;
39 *(.text)
40 *(.text.*)
41 *(.gnu.linkonce.t.*)
42 PROVIDE (__runtime_reloc_start = .);
43 *(.rel.sdata)
44 PROVIDE (__runtime_reloc_stop = .);
45 KEEP (*(.fini))
46 etext = .;
47 _etext = .;
48 }
49
50 .eh_frame_hdr : { *(.eh_frame_hdr) }
51 .eh_frame : {
52 /* The .eh_frame section from the crtend file contains the
53 end of eh_frame marker and it must be last. */
54 KEEP (*(EXCLUDE_FILE (*crtend.o) .eh_frame))
55 KEEP (*(.eh_frame))
56 }
57 .gcc_except_table : { *(.gcc_except_table) }
58 .jcr : { KEEP (*(.jcr)) }
59 .ctors :
60 {
61 /* gcc uses crtbegin.o to find the start of
62 the constructors, so we make sure it is
63 first. Because this is a wildcard, it
64 doesn't matter if the user does not
65 actually link against crtbegin.o; the
66 linker won't look for a file to match a
67 wildcard. The wildcard also means that it
68 doesn't matter which directory crtbegin.o
69 is in. */
70
71 KEEP (*crtbegin.o(.ctors))
72
73 /* We don't want to include the .ctor section from
74 from the crtend.o file until after the sorted ctors.
75 The .ctor section from the crtend file contains the
76 end of ctors marker and it must be last */
77
78 KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
79 KEEP (*(SORT(.ctors.*)))
80 KEEP (*(.ctors))
81 }
82
83 .dtors :
84 {
85 KEEP (*crtbegin.o(.dtors))
86 KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
87 KEEP (*(SORT(.dtors.*)))
88 KEEP (*(.dtors))
89 }
90
91 . = .;
92 .rodata : {
93 *(.rdata)
94 *(.rodata)
95 *(.rodata.*)
96 *(.gnu.linkonce.r.*)
97 }
98 _fdata = ALIGN(16);
99 . = _fdata;
100 .data : {
101 *(.data)
102 *(.data.*)
103 *(.gnu.linkonce.d.*)
104 CONSTRUCTORS
105 }
106 . = ALIGN(8);
107 _gp = . + 0x8000;
108 __global = _gp;
109 .lit8 : {
110 *(.lit8)
111 }
112 .lit4 : {
113 *(.lit4)
114 }
115 .sdata : {
116 *(.sdata)
117 *(.sdata.*)
118 *(.gnu.linkonce.s.*)
119 }
120 edata = .;
121 _edata = .;
122 _fbss = .;
123 .sbss : {
124 *(.sbss)
125 *(.sbss.*)
126 *(.gnu.linkonce.sb.*)
127 *(.scommon)
128 }
129 .bss : {
130 _bss_start = . ;
131 *(.bss)
132 *(.bss.*)
133 *(.gnu.linkonce.b.*)
134 *(COMMON)
135 }
136 . = ALIGN(4);
137 end = .;
138 _end = .;
139 }
This page took 0.044813 seconds and 6 git commands to generate.