source: trunk/libs/newlib/src/libgloss/xstormy16/eva_stub.ld @ 444

Last change on this file since 444 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 
1OUTPUT_FORMAT("elf32-xstormy16", "elf32-xstormy16",
2              "elf32-xstormy16")
3OUTPUT_ARCH(xstormy16)
4ENTRY(_start)
5
6MEMORY
7{
8  CPUDATA (!w) : ORIGIN = 0x7F00, LENGTH = 0x100
9  ROM     (w)  : ORIGIN = 0x8000, LENGTH = 0x1000
10}
11
12/* Point interrupt vectors to user application. */
13PROVIDE (_int_basetimer = 0x10004);
14PROVIDE (_int_timer0 = 0x10008);
15PROVIDE (_int_timer1 = 0x1000C);
16PROVIDE (_int_sio0   = 0x10010);
17PROVIDE (_int_sio1   = 0x10014);
18PROVIDE (_int_port0  = 0x10018);
19PROVIDE (_int_port1  = 0x1001C);
20
21SECTIONS
22{
23  /* CPU data for Sanyo debugger */
24  .cpudata :  { KEEP (*(.cpudata)) } > CPUDATA
25  /* Read-only sections in ROM.  */
26  .int_vec  : { *(.int_vec) } > ROM
27  .rodata   : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } > ROM
28  .ctors   :
29  {
30    /* gcc uses crtbegin.o to find the start of
31       the constructors, so we make sure it is
32       first.  Because this is a wildcard, it
33       doesn't matter if the user does not
34       actually link against crtbegin.o; the
35       linker won't look for a file to match a
36       wildcard.  The wildcard also means that it
37       doesn't matter which directory crtbegin.o
38       is in.  */
39    KEEP (*crtbegin.o(.ctors))
40    /* We don't want to include the .ctor section from
41       from the crtend.o file until after the sorted ctors.
42       The .ctor section from the crtend file contains the
43       end of ctors marker and it must be last */
44    KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
45    KEEP (*(SORT(.ctors.*)))
46    KEEP (*(.ctors))
47  } > ROM
48   .dtors         :
49  {
50    KEEP (*crtbegin.o(.dtors))
51    KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
52    KEEP (*(SORT(.dtors.*)))
53    KEEP (*(.dtors))
54  } > ROM
55  .eh_frame : { KEEP (*(.eh_frame)) } > ROM
56  .gcc_except_table : { *(.gcc_except_table) *(.gcc_except_table.*) } > ROM
57  .jcr : { *(.jcr) } > ROM
58  .plt : { *(.plt) } > ROM
59  .text      :
60  {
61    *(.text)
62    *(.text.*)
63    *(.stub)
64    /* .gnu.warning sections are handled specially by elf32.em.  */
65    *(.gnu.warning)
66    *(.gnu.linkonce.t.*)
67  } > ROM =0
68  .init          :
69  {
70    KEEP (*(.init))
71  } > ROM =0
72  .fini      :
73  {
74    KEEP (*(.fini))
75  } > ROM =0
76  PROVIDE (__etext = .);
77  PROVIDE (_etext = .);
78  PROVIDE (etext = .);
79  .data    :
80  {
81    __data = .;
82    __rdata = .;
83    *(.data)
84    *(.data.*)
85    *(.gnu.linkonce.d.*)
86    SORT(CONSTRUCTORS)
87  } > ROM
88  _edata = .;
89  PROVIDE (edata = .);
90  __bss_start = .;
91  .bss       :
92  {
93   *(.dynbss)
94   *(.bss)
95   *(.bss.*)
96   *(.gnu.linkonce.b.*)
97   *(COMMON)
98   /* Align here to ensure that the .bss section occupies space up to
99      _end.  Align after .bss to ensure correct alignment even if the
100      .bss section disappears because there are no input sections.  */
101   . = ALIGN(2);
102  } > ROM
103  . = ALIGN(2);
104  _end = .;
105  PROVIDE (end = .);
106
107  /* Stabs debugging sections.  */
108  .stab 0 : { *(.stab) }
109  .stabstr 0 : { *(.stabstr) }
110  .stab.excl 0 : { *(.stab.excl) }
111  .stab.exclstr 0 : { *(.stab.exclstr) }
112  .stab.index 0 : { *(.stab.index) }
113  .stab.indexstr 0 : { *(.stab.indexstr) }
114  .comment 0 : { *(.comment) }
115  /* DWARF debug sections.
116     Symbols in the DWARF debugging sections are relative to the beginning
117     of the section so we begin them at 0.  */
118  /* DWARF 1 */
119  .debug          0 : { *(.debug) }
120  .line           0 : { *(.line) }
121  /* GNU DWARF 1 extensions */
122  .debug_srcinfo  0 : { *(.debug_srcinfo) }
123  .debug_sfnames  0 : { *(.debug_sfnames) }
124  /* DWARF 1.1 and DWARF 2 */
125  .debug_aranges  0 : { *(.debug_aranges) }
126  .debug_pubnames 0 : { *(.debug_pubnames) }
127  /* DWARF 2 */
128  .debug_info     0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
129  .debug_abbrev   0 : { *(.debug_abbrev) }
130  .debug_line     0 : { *(.debug_line) }
131  .debug_frame    0 : { *(.debug_frame) }
132  .debug_str      0 : { *(.debug_str) }
133  .debug_loc      0 : { *(.debug_loc) }
134  .debug_macinfo  0 : { *(.debug_macinfo) }
135  .debug_ranges   0 : { *(.debug_ranges) }
136  /* SGI/MIPS DWARF 2 extensions */
137  .debug_weaknames 0 : { *(.debug_weaknames) }
138  .debug_funcnames 0 : { *(.debug_funcnames) }
139  .debug_typenames 0 : { *(.debug_typenames) }
140  .debug_varnames  0 : { *(.debug_varnames) }
141  /* These must appear regardless of  .  */
142}
Note: See TracBrowser for help on using the repository browser.