1 /* Test xstormy16 programs that have initial data in ROM and copy it
4 OUTPUT_FORMAT("elf32-xstormy16", "elf32-xstormy16",
8 SEARCH_DIR(/cuddles/aph/sanyo-011113-branch/install/xstormy16-elf/lib);
9 /* There are two memory regions we care about, one from 0 through 0x7F00
10 that is RAM and one from 0x8000 up which is ROM. */
13 RAM (w) : ORIGIN = 0, LENGTH = 0x7F00
14 ROM (!w) : ORIGIN = 0x8000, LENGTH = 0xFF8000
18 /* Read-only sections in ROM. */
19 .int_vec : { *(.int_vec) } > ROM
20 .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } > ROM
23 /* gcc uses crtbegin.o to find the start of
24 the constructors, so we make sure it is
25 first. Because this is a wildcard, it
26 doesn't matter if the user does not
27 actually link against crtbegin.o; the
28 linker won't look for a file to match a
29 wildcard. The wildcard also means that it
30 doesn't matter which directory crtbegin.o
32 KEEP (*crtbegin.o(.ctors))
33 /* We don't want to include the .ctor section from
34 from the crtend.o file until after the sorted ctors.
35 The .ctor section from the crtend file contains the
36 end of ctors marker and it must be last */
37 KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
38 KEEP (*(SORT(.ctors.*)))
43 KEEP (*crtbegin.o(.dtors))
44 KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
45 KEEP (*(SORT(.dtors.*)))
48 .jcr : { KEEP (*(.jcr)) } > ROM
49 .eh_frame : { KEEP (*(.eh_frame)) } > ROM
50 .gcc_except_table : { *(.gcc_except_table) *(.gcc_except_table.*) } > ROM
51 .plt : { *(.plt) } > ROM
57 /* .gnu.warning sections are handled specially by elf32.em. */
69 PROVIDE (__etext = .);
85 /* Why do we need to give bss an AT address at all? Because if we
86 don't, ld will generate another program header for it rather than
87 using the one for .data. */
88 .bss : AT (LOADADDR(.data) + SIZEOF(.data))
95 /* Align here to ensure that the .bss section occupies space up to
96 _end. Align after .bss to ensure correct alignment even if the
97 .bss section disappears because there are no input sections. */
104 /* Stabs debugging sections. */
105 .stab 0 : { *(.stab) }
106 .stabstr 0 : { *(.stabstr) }
107 .stab.excl 0 : { *(.stab.excl) }
108 .stab.exclstr 0 : { *(.stab.exclstr) }
109 .stab.index 0 : { *(.stab.index) }
110 .stab.indexstr 0 : { *(.stab.indexstr) }
111 .comment 0 : { *(.comment) }
112 /* DWARF debug sections.
113 Symbols in the DWARF debugging sections are relative to the beginning
114 of the section so we begin them at 0. */
116 .debug 0 : { *(.debug) }
117 .line 0 : { *(.line) }
118 /* GNU DWARF 1 extensions */
119 .debug_srcinfo 0 : { *(.debug_srcinfo) }
120 .debug_sfnames 0 : { *(.debug_sfnames) }
121 /* DWARF 1.1 and DWARF 2 */
122 .debug_aranges 0 : { *(.debug_aranges) }
123 .debug_pubnames 0 : { *(.debug_pubnames) }
125 .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
126 .debug_abbrev 0 : { *(.debug_abbrev) }
127 .debug_line 0 : { *(.debug_line) }
128 .debug_frame 0 : { *(.debug_frame) }
129 .debug_str 0 : { *(.debug_str) }
130 .debug_loc 0 : { *(.debug_loc) }
131 .debug_macinfo 0 : { *(.debug_macinfo) }
132 .debug_ranges 0 : { *(.debug_ranges) }
133 /* SGI/MIPS DWARF 2 extensions */
134 .debug_weaknames 0 : { *(.debug_weaknames) }
135 .debug_funcnames 0 : { *(.debug_funcnames) }
136 .debug_typenames 0 : { *(.debug_typenames) }
137 .debug_varnames 0 : { *(.debug_varnames) }
138 /* These must appear regardless of . */