source: trunk/libs/newlib/src/libgloss/xstormy16/sim_high.ld @ 674

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

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

File size: 4.1 KB
Line 
1/* A modified version of the basic linker script, for testing purposes,
2   which puts all code above 0x10000.  */
3OUTPUT_FORMAT("elf32-xstormy16", "elf32-xstormy16",
4              "elf32-xstormy16")
5OUTPUT_ARCH(xstormy16)
6ENTRY(_start)
7 SEARCH_DIR(/es/scratch/geoffk/objs/mainline-sX/H-i686-pc-linux-gnulibc2.2/xstormy16-elf/lib);
8/* There are two memory regions we care about, one from 0 through 0x7F00
9   that is RAM and one from 0x8000 up which is ROM.  */
10MEMORY
11{
12  RAM (w) : ORIGIN = 0, LENGTH = 0x7F00
13  LOROM (!w) : ORIGIN = 0x8000, LENGTH = 0x8000
14  HIROM (!w) : ORIGIN = 0x10000, LENGTH = 0xFF0000
15}
16SECTIONS
17{
18  .data    :
19  {
20    __data = .;
21    __rdata = .;
22    *(.data)
23    *(.data.*)
24    *(.gnu.linkonce.d.*)
25    SORT(CONSTRUCTORS)
26  } > RAM
27  _edata = .;
28  PROVIDE (edata = .);
29  __bss_start = .;
30  .bss       :
31  {
32   *(.dynbss)
33   *(.bss)
34   *(.bss.*)
35   *(.gnu.linkonce.b.*)
36   *(COMMON)
37   /* Align here to ensure that the .bss section occupies space up to
38      _end.  Align after .bss to ensure correct alignment even if the
39      .bss section disappears because there are no input sections.  */
40   . = ALIGN(2);
41  } > RAM
42  . = ALIGN(2);
43  __stack = .;
44  _end = .;
45  PROVIDE (end = .);
46  /* Read-only sections in ROM.  */
47  .int_vec       : { *(.int_vec)        } > LOROM
48  .rodata   : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } > LOROM
49  .ctors   :
50  {
51    /* gcc uses crtbegin.o to find the start of
52       the constructors, so we make sure it is
53       first.  Because this is a wildcard, it
54       doesn't matter if the user does not
55       actually link against crtbegin.o; the
56       linker won't look for a file to match a
57       wildcard.  The wildcard also means that it
58       doesn't matter which directory crtbegin.o
59       is in.  */
60    KEEP (*crtbegin.o(.ctors))
61    /* We don't want to include the .ctor section from
62       from the crtend.o file until after the sorted ctors.
63       The .ctor section from the crtend file contains the
64       end of ctors marker and it must be last */
65    KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
66    KEEP (*(SORT(.ctors.*)))
67    KEEP (*(.ctors))
68  } > LOROM
69   .dtors         :
70  {
71    KEEP (*crtbegin.o(.dtors))
72    KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
73    KEEP (*(SORT(.dtors.*)))
74    KEEP (*(.dtors))
75  } > LOROM
76  .eh_frame : { KEEP (*(.eh_frame)) } > LOROM
77  .gcc_except_table : { *(.gcc_except_table) *(.gcc_except_table.*) } > LOROM
78  .jcr : { *(.jcr) } > LOROM
79  .plt : { *(.plt) } > LOROM
80  .text      :
81  {
82    *(.text)
83    *(.text.*)
84    *(.stub)
85    /* .gnu.warning sections are handled specially by elf32.em.  */
86    *(.gnu.warning)
87    *(.gnu.linkonce.t.*)
88  } > HIROM =0
89  .init          :
90  {
91    KEEP (*(.init))
92  } > HIROM =0
93  .fini      :
94  {
95    KEEP (*(.fini))
96  } > HIROM =0
97  PROVIDE (__etext = .);
98  PROVIDE (_etext = .);
99  PROVIDE (etext = .);
100  /* Stabs debugging sections.  */
101  .stab 0 : { *(.stab) }
102  .stabstr 0 : { *(.stabstr) }
103  .stab.excl 0 : { *(.stab.excl) }
104  .stab.exclstr 0 : { *(.stab.exclstr) }
105  .stab.index 0 : { *(.stab.index) }
106  .stab.indexstr 0 : { *(.stab.indexstr) }
107  .comment 0 : { *(.comment) }
108  /* DWARF debug sections.
109     Symbols in the DWARF debugging sections are relative to the beginning
110     of the section so we begin them at 0.  */
111  /* DWARF 1 */
112  .debug          0 : { *(.debug) }
113  .line           0 : { *(.line) }
114  /* GNU DWARF 1 extensions */
115  .debug_srcinfo  0 : { *(.debug_srcinfo) }
116  .debug_sfnames  0 : { *(.debug_sfnames) }
117  /* DWARF 1.1 and DWARF 2 */
118  .debug_aranges  0 : { *(.debug_aranges) }
119  .debug_pubnames 0 : { *(.debug_pubnames) }
120  /* DWARF 2 */
121  .debug_info     0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
122  .debug_abbrev   0 : { *(.debug_abbrev) }
123  .debug_line     0 : { *(.debug_line) }
124  .debug_frame    0 : { *(.debug_frame) }
125  .debug_str      0 : { *(.debug_str) }
126  .debug_loc      0 : { *(.debug_loc) }
127  .debug_macinfo  0 : { *(.debug_macinfo) }
128  .debug_ranges   0 : { *(.debug_ranges) }
129  /* SGI/MIPS DWARF 2 extensions */
130  .debug_weaknames 0 : { *(.debug_weaknames) }
131  .debug_funcnames 0 : { *(.debug_funcnames) }
132  .debug_typenames 0 : { *(.debug_typenames) }
133  .debug_varnames  0 : { *(.debug_varnames) }
134  /* These must appear regardless of  .  */
135}
Note: See TracBrowser for help on using the repository browser.