source: trunk/libs/newlib/src/libgloss/mips/ddb.ld @ 474

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

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

File size: 3.9 KB
RevLine 
[444]1/* The following TEXT start address leaves space for the monitor
2   workspace. */
3
4ENTRY(_start)
5STARTUP(crt0.o)
6OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-littlemips")
7GROUP(-lc -lpmon -lgcc)
8SEARCH_DIR(.)
9__DYNAMIC  =  0;
10
11/*
12 * Allocate the stack to be at the top of memory, since the stack
13 * grows down
14 */
15PROVIDE (__stack = 0);
16/* PROVIDE (__global = 0); */
17
18/*
19 * Initalize some symbols to be zero so we can reference them in the
20 * crt0 without core dumping. These functions are all optional, but
21 * we do this so we can have our crt0 always use them if they exist.
22 * This is so BSPs work better when using the crt0 installed with gcc.
23 * We have to initalize them twice, so we multiple object file
24 * formats, as some prepend an underscore.
25 */
26PROVIDE (hardware_exit_hook = 0);
27PROVIDE (hardware_hazard_hook = 0);
28PROVIDE (hardware_init_hook = 0);
29PROVIDE (software_init_hook = 0);
30
31SECTIONS
32{       
33  . = 0xA0100000;
34  .text : {
35     _ftext = . ;
36    KEEP (*(.init))
37     eprol  =  .;
38    *(.text)
39    *(.text.*)
40    *(.gnu.linkonce.t.*)
41    *(.mips16.fn.*)
42    *(.mips16.call.*)
43    PROVIDE (__runtime_reloc_start = .);
44    *(.rel.sdata)
45    PROVIDE (__runtime_reloc_stop = .);
46    KEEP (*(.fini))
47     etext  =  .;
48     _etext  =  .;
49  }
50 
51  .eh_frame_hdr : { *(.eh_frame_hdr) }
52  .eh_frame : { KEEP (*(.eh_frame)) }
53  .gcc_except_table : { *(.gcc_except_table) }
54  .jcr : { KEEP (*(.jcr)) }
55  .ctors    :
56  {
57    /* gcc uses crtbegin.o to find the start of
58       the constructors, so we make sure it is
59       first.  Because this is a wildcard, it
60       doesn't matter if the user does not
61       actually link against crtbegin.o; the
62       linker won't look for a file to match a
63       wildcard.  The wildcard also means that it
64       doesn't matter which directory crtbegin.o
65       is in.  */
66
67    KEEP (*crtbegin.o(.ctors))
68
69    /* We don't want to include the .ctor section from
70       from the crtend.o file until after the sorted ctors.
71       The .ctor section from the crtend file contains the
72       end of ctors marker and it must be last */
73
74    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
75    KEEP (*(SORT(.ctors.*)))
76    KEEP (*(.ctors))
77  }
78
79  .dtors    :
80  {
81    KEEP (*crtbegin.o(.dtors))
82    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
83    KEEP (*(SORT(.dtors.*)))
84    KEEP (*(.dtors))
85  }
86
87  . = .;
88  .rdata : {
89    *(.rdata)
90    *(.rodata)
91    *(.rodata.*)
92    *(.gnu.linkonce.r.*)
93  }
94   _fdata = ALIGN(16);
95  .data : {
96    *(.data)
97    *(.data.*)
98    *(.gnu.linkonce.d.*)
99  }
100  . = ALIGN(8);
101  _gp = . + 0x8000;
102  __global = _gp;
103  .lit8 : {
104    *(.lit8)
105  }
106  .lit4 : {
107    *(.lit4)
108  }
109  .sdata : {
110    *(.sdata)
111    *(.sdata.*)
112    *(.gnu.linkonce.s.*)
113  }
114  . = ALIGN(4);
115   edata  =  .;
116   _edata  =  .;
117   _fbss = .;
118  .sbss : {
119    *(.sbss)
120    *(.sbss.*)
121    *(.gnu.linkonce.sb.*)
122    *(.scommon)
123  }
124  .bss : {
125    _bss_start = . ;
126    *(.bss)
127    *(.bss.*)
128    *(.gnu.linkonce.b.*)
129    *(COMMON)
130  }
131
132   end = .;
133   _end = .;
134
135  /* DWARF debug sections.
136     Symbols in the DWARF debugging sections are relative to
137     the beginning of the section so we begin them at 0.  */
138
139  /* DWARF 1 */
140  .debug          0 : { *(.debug) }
141  .line           0 : { *(.line) }
142
143  /* GNU DWARF 1 extensions */
144  .debug_srcinfo  0 : { *(.debug_srcinfo) }
145  .debug_sfnames  0 : { *(.debug_sfnames) }
146
147  /* DWARF 1.1 and DWARF 2 */
148  .debug_aranges  0 : { *(.debug_aranges) }
149  .debug_pubnames 0 : { *(.debug_pubnames) }
150
151  /* DWARF 2 */
152  .debug_info     0 : { *(.debug_info) }
153  .debug_abbrev   0 : { *(.debug_abbrev) }
154  .debug_line     0 : { *(.debug_line) }
155  .debug_frame    0 : { *(.debug_frame) }
156  .debug_str      0 : { *(.debug_str) }
157  .debug_loc      0 : { *(.debug_loc) }
158  .debug_macinfo  0 : { *(.debug_macinfo) }
159  .debug_ranges   0 : { *(.debug_ranges) }
160
161  /* SGI/MIPS DWARF 2 extensions */
162  .debug_weaknames 0 : { *(.debug_weaknames) }
163  .debug_funcnames 0 : { *(.debug_funcnames) }
164  .debug_typenames 0 : { *(.debug_typenames) }
165  .debug_varnames  0 : { *(.debug_varnames) }
166}
Note: See TracBrowser for help on using the repository browser.