source: trunk/libs/newlib/src/libgloss/mep/min.ld @ 621

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

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

File size: 6.1 KB
RevLine 
[444]1/*
2 * Copyright (c) 2000  Red Hat, Inc. All rights reserved.
3 *
4 * This copyrighted material is made available to anyone wishing to use, modify,
5 * copy, or redistribute it subject to the terms and conditions of the BSD
6 * License.   This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY expressed or implied, including the implied
8 * warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  A copy
9 * of this license is available at http://www.opensource.org/licenses. Any
10 * Red Hat trademarks that are incorporated in the source code or documentation
11 * are not subject to the BSD License and may only be used or replicated with
12 * the express permission of Red Hat, Inc.
13 */
14OUTPUT_FORMAT("elf32-mep", "elf32-mep",
15              "elf32-mep")
16OUTPUT_ARCH(mep)
17ENTRY(_start)
18SECTIONS
19{
20  /* Read-only sections, merged into text segment: */
21  . = 0x0080000;
22  .gnu.version   : { *(.gnu.version)    }
23  .gnu.version_d   : { *(.gnu.version_d)        }
24  .gnu.version_r   : { *(.gnu.version_r)        }
25  .init          :
26  {
27    KEEP (*(.init))
28  } =0
29  .plt      : { *(.plt) }
30  .text      :
31  {
32    *(.text)
33    *(.text.*)
34    *(.stub)
35    /* .gnu.warning sections are handled specially by elf32.em.  */
36    *(.gnu.warning)
37    *(.gnu.linkonce.t.*)
38    *(.ftext) *(.ftext.*) *(.gnu.linkonce.ft.*)
39    . = ALIGN(8);
40    *(.vftext) *(.vftext.*) *(.gnu.linkonce.vf.*)
41    *(.frodata) *(.frodata.*) *(.gnu.linkonce.frd.*)
42  } =0
43  .fini      :
44  {
45    KEEP (*(.fini))
46  } =0
47  PROVIDE (__etext = .);
48  PROVIDE (_etext = .);
49  PROVIDE (etext = .);
50  .rodata   : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) }
51  .rodata1   : { *(.rodata1) }
52
53  __stack_size = 0x100000;
54  __stack0  = (__stack - (0 *  (__stack_size / 1)) + 15) / 16 * 16;
55
56  .rostacktab :
57  {
58    /* Emit a table describing the location of the different stacks.
59       Only 1 processor in the default configuration.  */
60    . = ALIGN(4);
61    __stack_table = .;
62    LONG (__stack0);
63  }
64
65  .sdata2   : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }
66  .sbss2   : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }
67  /* Adjust the address for the data segment.  We want to adjust up to
68     the same address within the page on the next page up.  */
69  . = ALIGN(256) + (. & (256 - 1));
70  .data    :
71  {
72    __data_start = . ;
73    *(.data)
74    *(.data.*)
75    *(.gnu.linkonce.d.*)
76    SORT(CONSTRUCTORS)
77  }
78  .data1   : { *(.data1) }
79  .eh_frame : { KEEP (*(.eh_frame)) }
80  .gcc_except_table : { *(.gcc_except_table) *(.gcc_except_table.*) }
81  . = ALIGN(4);
82  __tpbase = .;
83  .based : { *(.based) *(.based.*) *(.gnu.linkonce.based.*) }
84  .far : { *(.far) *(.far.*) *(.gnu.linkonce.far.*) }
85  .dynamic       : { *(.dynamic) }
86  .ctors   :
87  {
88    /* gcc uses crtbegin.o to find the start of
89       the constructors, so we make sure it is
90       first.  Because this is a wildcard, it
91       doesn't matter if the user does not
92       actually link against crtbegin.o; the
93       linker won't look for a file to match a
94       wildcard.  The wildcard also means that it
95       doesn't matter which directory crtbegin.o
96       is in.  */
97    KEEP (*crtbegin.o(.ctors))
98    /* We don't want to include the .ctor section from
99       from the crtend.o file until after the sorted ctors.
100       The .ctor section from the crtend file contains the
101       end of ctors marker and it must be last */
102    KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
103    KEEP (*(SORT(.ctors.*)))
104    KEEP (*(.ctors))
105  }
106   .dtors         :
107  {
108    KEEP (*crtbegin.o(.dtors))
109    KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
110    KEEP (*(SORT(.dtors.*)))
111    KEEP (*(.dtors))
112  }
113  . = ALIGN(4);
114  __sdabase = . + 0x8000;
115  .got            : { *(.got.plt) *(.got) }
116  /* We want the small data sections together, so single-instruction offsets
117     can access them all, and initialized data all before uninitialized, so
118     we can shorten the on-disk segment size.  */
119  .srodata : { *(.srodata) *(.srodata.*) *(.gnu.linkonce.srd.*) }
120  .sdata     :
121  {
122    *(.sdata)
123    *(.sdata.*)
124    *(.gnu.linkonce.s.*)
125  }
126  _edata = .;
127  PROVIDE (edata = .);
128  __bss_start = .;
129  .sbss      :
130  {
131    PROVIDE (__sbss_start = .);
132    PROVIDE (___sbss_start = .);
133    *(.dynsbss)
134    *(.sbss)
135    *(.sbss.*)
136    *(.gnu.linkonce.sb.*)
137    *(.scommon)
138    PROVIDE (__sbss_end = .);
139    PROVIDE (___sbss_end = .);
140  }
141  .bss       :
142  {
143   *(.dynbss)
144   *(.bss)
145   *(.bss.*)
146   *(.gnu.linkonce.b.*)
147   *(COMMON)
148   /* Align here to ensure that the .bss section occupies space up to
149      _end.  Align after .bss to ensure correct alignment even if the
150      .bss section disappears because there are no input sections.  */
151   . = ALIGN(32 / 8);
152  }
153  .farbss : { PROVIDE (__farbss_start = .); *(.farbss) *(.farbss.*) PROVIDE (__farbss_end = .); }
154  . = ALIGN(32 / 8);
155  _end = .;
156  PROVIDE (end = .);
157
158  __stack = 0x00effff0;
159  PROVIDE (__heap  = 0x00f00000);
160
161  /* Stabs debugging sections.  */
162  .stab 0 : { *(.stab) }
163  .stabstr 0 : { *(.stabstr) }
164  .stab.excl 0 : { *(.stab.excl) }
165  .stab.exclstr 0 : { *(.stab.exclstr) }
166  .stab.index 0 : { *(.stab.index) }
167  .stab.indexstr 0 : { *(.stab.indexstr) }
168  .comment 0 : { *(.comment) }
169  /* DWARF debug sections.
170     Symbols in the DWARF debugging sections are relative to the beginning
171     of the section so we begin them at 0.  */
172  /* DWARF 1 */
173  .debug          0 : { *(.debug) }
174  .line           0 : { *(.line) }
175  /* GNU DWARF 1 extensions */
176  .debug_srcinfo  0 : { *(.debug_srcinfo) }
177  .debug_sfnames  0 : { *(.debug_sfnames) }
178  /* DWARF 1.1 and DWARF 2 */
179  .debug_aranges  0 : { *(.debug_aranges) }
180  .debug_pubnames 0 : { *(.debug_pubnames) }
181  /* DWARF 2 */
182  .debug_info     0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
183  .debug_abbrev   0 : { *(.debug_abbrev) }
184  .debug_line     0 : { *(.debug_line) }
185  .debug_frame    0 : { *(.debug_frame) }
186  .debug_str      0 : { *(.debug_str) }
187  .debug_loc      0 : { *(.debug_loc) }
188  .debug_macinfo  0 : { *(.debug_macinfo) }
189  .debug_ranges   0 : { *(.debug_ranges) }
190  /* SGI/MIPS DWARF 2 extensions */
191  .debug_weaknames 0 : { *(.debug_weaknames) }
192  .debug_funcnames 0 : { *(.debug_funcnames) }
193  .debug_typenames 0 : { *(.debug_typenames) }
194  .debug_varnames  0 : { *(.debug_varnames) }
195  /* These must appear regardless of  .  */
196}
Note: See TracBrowser for help on using the repository browser.