source: trunk/libs/newlib/src/libgloss/mips/nullmon.ld @ 452

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

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

File size: 4.5 KB
RevLine 
[444]1/* The following TEXT start address leaves space for the monitor
2   workspace. */
3
4ENTRY(_start)
5STARTUP(crt0.o)
6OUTPUT_ARCH("mips:4000")
7OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-littlemips")
8GROUP(-lc -lnullmon -lgcc)
9SEARCH_DIR(.)
10__DYNAMIC  =  0;
11
12/*
13 * Allocate the stack to be at the top of memory, since the stack
14 * grows down
15 */
16PROVIDE (__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 */
27PROVIDE (hardware_exit_hook = 0);
28PROVIDE (hardware_hazard_hook = 0);
29PROVIDE (hardware_init_hook = 0);
30PROVIDE (software_init_hook = 0);
31
32SECTIONS
33{       
34  . = 0xA0020000;
35  .text : {
36     _ftext = . ;
37    KEEP (*(.init))
38     eprol  =  .;
39    *(.text)
40    *(.text.*)
41    *(.gnu.linkonce.t.*)
42    *(.mips16.fn.*)
43    *(.mips16.call.*)
44    PROVIDE (__runtime_reloc_start = .);
45    *(.rel.sdata)
46    PROVIDE (__runtime_reloc_stop = .);
47    KEEP (*(.fini))
48     etext  =  .;
49     _etext  =  .;
50  }
51 
52  .eh_frame_hdr : { *(.eh_frame_hdr) }
53  .eh_frame : { KEEP (*(.eh_frame)) }
54  .gcc_except_table : { *(.gcc_except_table) }
55  .jcr : { KEEP (*(.jcr)) }
56  .ctors    :
57  {
58    /* gcc uses crtbegin.o to find the start of
59       the constructors, so we make sure it is
60       first.  Because this is a wildcard, it
61       doesn't matter if the user does not
62       actually link against crtbegin.o; the
63       linker won't look for a file to match a
64       wildcard.  The wildcard also means that it
65       doesn't matter which directory crtbegin.o
66       is in.  */
67
68    KEEP (*crtbegin.o(.ctors))
69
70    /* We don't want to include the .ctor section from
71       from the crtend.o file until after the sorted ctors.
72       The .ctor section from the crtend file contains the
73       end of ctors marker and it must be last */
74
75    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
76    KEEP (*(SORT(.ctors.*)))
77    KEEP (*(.ctors))
78  }
79
80  .dtors    :
81  {
82    KEEP (*crtbegin.o(.dtors))
83    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
84    KEEP (*(SORT(.dtors.*)))
85    KEEP (*(.dtors))
86  }
87
88  . = .;
89  .rodata : {
90    *(.rdata)
91    *(.rodata)
92    *(.rodata.*)
93    *(.gnu.linkonce.r.*)
94  }
95   _fdata = ALIGN(16);
96  .data : {
97    *(.data)
98    *(.data.*)
99    *(.gnu.linkonce.d.*)
100  }
101  . = ALIGN(8);
102  _gp = . + 0x8000;
103  __global = _gp;
104  .lit8 : {
105    *(.lit8)
106  }
107  .lit4 : {
108    *(.lit4)
109  }
110  .sdata : {
111    *(.sdata)
112    *(.sdata.*)
113    *(.gnu.linkonce.s.*)
114  }
115  . = ALIGN(4);
116   edata  =  .;
117   _edata  =  .;
118   _fbss = .;
119  .sbss : {
120    *(.sbss)
121    *(.sbss.*)
122    *(.gnu.linkonce.sb.*)
123    *(.scommon)
124  }
125  .bss : {
126    _bss_start = . ;
127    *(.bss)
128    *(.bss.*)
129    *(.gnu.linkonce.b.*)
130    *(COMMON)
131  }
132   . = ALIGN(64) ;
133   end = .;
134   _end = .;
135
136
137  /* DWARF debug sections.
138     Symbols in the DWARF debugging sections are relative to
139     the beginning of the section so we begin them at 0.  */
140
141  /* DWARF 1 */
142  .debug          0 : { *(.debug) }
143  .line           0 : { *(.line) }
144
145  /* GNU DWARF 1 extensions */
146  .debug_srcinfo  0 : { *(.debug_srcinfo) }
147  .debug_sfnames  0 : { *(.debug_sfnames) }
148
149  /* DWARF 1.1 and DWARF 2 */
150  .debug_aranges  0 : { *(.debug_aranges) }
151  .debug_pubnames 0 : { *(.debug_pubnames) }
152
153  /* DWARF 2 */
154  .debug_info     0 : { *(.debug_info) }
155  .debug_abbrev   0 : { *(.debug_abbrev) }
156  .debug_line     0 : { *(.debug_line) }
157  .debug_frame    0 : { *(.debug_frame) }
158  .debug_str      0 : { *(.debug_str) }
159  .debug_loc      0 : { *(.debug_loc) }
160  .debug_macinfo  0 : { *(.debug_macinfo) }
161  .debug_ranges   0 : { *(.debug_ranges) }
162
163  /* SGI/MIPS DWARF 2 extensions */
164  .debug_weaknames 0 : { *(.debug_weaknames) }
165  .debug_funcnames 0 : { *(.debug_funcnames) }
166  .debug_typenames 0 : { *(.debug_typenames) }
167  .debug_varnames  0 : { *(.debug_varnames) }
168
169  /* Special sections generated by gcc */
170  /* Newer GNU linkers strip by default */
171  .mdebug.abi32            0 : { KEEP(*(.mdebug.abi32)) }
172  .mdebug.abiN32           0 : { KEEP(*(.mdebug.abiN32)) }
173  .mdebug.abi64            0 : { KEEP(*(.mdebug.abi64)) }
174  .mdebug.abiO64           0 : { KEEP(*(.mdebug.abiO64)) }
175  .mdebug.eabi32           0 : { KEEP(*(.mdebug.eabi32)) }
176  .mdebug.eabi64           0 : { KEEP(*(.mdebug.eabi64)) }
177  .gcc_compiled_long32     0 : { KEEP(*(.gcc_compiled_long32)) }
178  .gcc_compiled_long64     0 : { KEEP(*(.gcc_compiled_long64)) }
179}
Note: See TracBrowser for help on using the repository browser.