source: trunk/libs/newlib/src/libgloss/mips/jmr3904app.ld @ 546

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

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

File size: 4.1 KB
Line 
1/* Linker script forJMR 3904 board */
2
3ENTRY(_start)
4STARTUP(crt0.o)
5OUTPUT_ARCH("mips:3000")
6OUTPUT_FORMAT("elf32-bigmips", "elf32-bigmips", "elf32-littlemips")
7GROUP(-lc -ljmr3904 -lgcc)
8SEARCH_DIR(.)
9__DYNAMIC  =  0;
10
11PROVIDE (_mem_size = 0x100000); /* JMR3904 comes as standard with 512k of RAM */
12
13/* PROVIDE (__global = 0); */
14
15/*
16 * Initalize some symbols to be zero so we can reference them in the
17 * crt0 without core dumping. These functions are all optional, but
18 * we do this so we can have our crt0 always use them if they exist.
19 * This is so BSPs work better when using the crt0 installed with gcc.
20 * We have to initalize them twice, so we multiple object file
21 * formats, as some prepend an underscore.
22 */
23PROVIDE (hardware_exit_hook = 0);
24PROVIDE (hardware_hazard_hook = 0);
25PROVIDE (hardware_init_hook = 0);
26PROVIDE (software_init_hook = 0);
27
28SECTIONS
29{       
30  . = 0x80008000;
31      /* This is NOT the address which fits with the monitor from jmr. */
32      /* It fits the Cygmon ROMS */
33  .text : {
34     _ftext = . ;
35    KEEP (*(.init))
36     eprol  =  .;
37    *(.text)
38    *(.text.*)
39    *(.gnu.linkonce.t.*)
40    *(.mips16.fn.*)
41    *(.mips16.call.*)
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 : { KEEP (*(.eh_frame)) }
52  .gcc_except_table : { *(.gcc_except_table) }
53  .jcr : { KEEP (*(.jcr)) }
54  .ctors    :
55  {
56    /* gcc uses crtbegin.o to find the start of
57       the constructors, so we make sure it is
58       first.  Because this is a wildcard, it
59       doesn't matter if the user does not
60       actually link against crtbegin.o; the
61       linker won't look for a file to match a
62       wildcard.  The wildcard also means that it
63       doesn't matter which directory crtbegin.o
64       is in.  */
65
66    KEEP (*crtbegin.o(.ctors))
67
68    /* We don't want to include the .ctor section from
69       from the crtend.o file until after the sorted ctors.
70       The .ctor section from the crtend file contains the
71       end of ctors marker and it must be last */
72
73    KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
74    KEEP (*(SORT(.ctors.*)))
75    KEEP (*(.ctors))
76  }
77
78  .dtors    :
79  {
80    KEEP (*crtbegin.o(.dtors))
81    KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
82    KEEP (*(SORT(.dtors.*)))
83    KEEP (*(.dtors))
84  }
85
86  . = .;
87  .rodata : {
88    *(.rdata)
89    *(.rodata)
90    *(.rodata.*)
91    *(.gnu.linkonce.r.*)
92  }
93   _fdata = ALIGN(16);
94  .data : {
95    *(.data)
96    *(.data.*)
97    *(.gnu.linkonce.d.*)
98  }
99  . = ALIGN(8);
100  _gp = . + 0x8000;
101  __global = _gp;
102  .lit8 : {
103    *(.lit8)
104  }
105  .lit4 : {
106    *(.lit4)
107  }
108  .sdata : {
109    *(.sdata)
110    *(.sdata.*)
111    *(.gnu.linkonce.s.*)
112  }
113  . = ALIGN(4);
114   edata  =  .;
115   _edata  =  .;
116   _fbss = .;
117  .sbss : {
118    *(.sbss)
119    *(.sbss.*)
120    *(.gnu.linkonce.sb.*)
121    *(.scommon)
122  }
123  .bss : {
124    _bss_start = . ;
125    *(.bss)
126    *(.bss.*)
127    *(.gnu.linkonce.b.*)
128    *(COMMON)
129    . += 0x2000 ;  /* 8k bytes of stack. */
130    __stack = ALIGN(64) ;
131    . = __stack ;
132  }
133
134   end = .;
135   _end = .;
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}
Note: See TracBrowser for help on using the repository browser.