Search
lxdream.org :: lxdream/test/dc.x :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename test/dc.x
changeset 185:6755a04c447f
next1169:23a9613aceb1
author nkeynes
date Tue Feb 13 08:34:27 2007 +0000 (17 years ago)
permissions -rw-r--r--
last change Add tests for FLOAT and FTRC
Comment out user-mode exception test (broken)
file annotate diff log raw
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/dc.x Tue Feb 13 08:34:27 2007 +0000
1.3 @@ -0,0 +1,228 @@
1.4 +/* Sega Dreamcast linker script */
1.5 +
1.6 +OUTPUT_FORMAT("elf32-shl", "elf32-shl",
1.7 + "elf32-shl")
1.8 +OUTPUT_ARCH(sh)
1.9 +ENTRY(start)
1.10 + SEARCH_DIR(/usr/local/dcdev/sh-elf/lib);
1.11 +/* Do we need any of these for elf?
1.12 + __DYNAMIC = 0; */
1.13 +
1.14 +MEMORY
1.15 +{
1.16 + ram (rwx) : ORIGIN = 0x8c010000, LENGTH = 0xfe0000
1.17 +}
1.18 +
1.19 +SECTIONS
1.20 +{
1.21 + /* Read-only sections, merged into text segment: */
1.22 +/* . = 0x1000;*/
1.23 + .interp : { *(.interp) }
1.24 + .hash : { *(.hash) }
1.25 + .dynsym : { *(.dynsym) }
1.26 + .dynstr : { *(.dynstr) }
1.27 + .gnu.version : { *(.gnu.version) }
1.28 + .gnu.version_d : { *(.gnu.version_d) }
1.29 + .gnu.version_r : { *(.gnu.version_r) }
1.30 + .rel.init : { *(.rel.init) }
1.31 + .rela.init : { *(.rela.init) }
1.32 + .rel.text :
1.33 + {
1.34 + *(.rel.text)
1.35 + *(.rel.text.*)
1.36 + *(.rel.gnu.linkonce.t*)
1.37 + }
1.38 + .rela.text :
1.39 + {
1.40 + *(.rela.text)
1.41 + *(.rela.text.*)
1.42 + *(.rela.gnu.linkonce.t*)
1.43 + }
1.44 + .rel.fini : { *(.rel.fini) }
1.45 + .rela.fini : { *(.rela.fini) }
1.46 + .rel.rodata :
1.47 + {
1.48 + *(.rel.rodata)
1.49 + *(.rel.rodata.*)
1.50 + *(.rel.gnu.linkonce.r*)
1.51 + }
1.52 + .rela.rodata :
1.53 + {
1.54 + *(.rela.rodata)
1.55 + *(.rela.rodata.*)
1.56 + *(.rela.gnu.linkonce.r*)
1.57 + }
1.58 + .rel.data :
1.59 + {
1.60 + *(.rel.data)
1.61 + *(.rel.data.*)
1.62 + *(.rel.gnu.linkonce.d*)
1.63 + }
1.64 + .rela.data :
1.65 + {
1.66 + *(.rela.data)
1.67 + *(.rela.data.*)
1.68 + *(.rela.gnu.linkonce.d*)
1.69 + }
1.70 + .rel.ctors : { *(.rel.ctors) }
1.71 + .rela.ctors : { *(.rela.ctors) }
1.72 + .rel.dtors : { *(.rel.dtors) }
1.73 + .rela.dtors : { *(.rela.dtors) }
1.74 + .rel.got : { *(.rel.got) }
1.75 + .rela.got : { *(.rela.got) }
1.76 + .rel.sdata :
1.77 + {
1.78 + *(.rel.sdata)
1.79 + *(.rel.sdata.*)
1.80 + *(.rel.gnu.linkonce.s*)
1.81 + }
1.82 + .rela.sdata :
1.83 + {
1.84 + *(.rela.sdata)
1.85 + *(.rela.sdata.*)
1.86 + *(.rela.gnu.linkonce.s*)
1.87 + }
1.88 + .rel.sbss : { *(.rel.sbss) }
1.89 + .rela.sbss : { *(.rela.sbss) }
1.90 + .rel.bss : { *(.rel.bss) }
1.91 + .rela.bss : { *(.rela.bss) }
1.92 + .rel.plt : { *(.rel.plt) }
1.93 + .rela.plt : { *(.rela.plt) }
1.94 + .init :
1.95 + {
1.96 + KEEP (*(.init))
1.97 + } =0
1.98 + .plt : { *(.plt) }
1.99 + .text :
1.100 + {
1.101 + *(.text)
1.102 + *(.text.*)
1.103 + *(.stub)
1.104 + /* .gnu.warning sections are handled specially by elf32.em. */
1.105 + *(.gnu.warning)
1.106 + *(.gnu.linkonce.t*)
1.107 + } =0
1.108 + _etext = .;
1.109 + PROVIDE (etext = .);
1.110 + .fini :
1.111 + {
1.112 + KEEP (*(.fini))
1.113 + } =0
1.114 + .rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) }
1.115 + .rodata1 : { *(.rodata1) }
1.116 + /* Adjust the address for the data segment. We want to adjust up to
1.117 + the same address within the page on the next page up. */
1.118 + . = ALIGN(128) + (. & (128 - 1));
1.119 + .data :
1.120 + {
1.121 + *(.data)
1.122 + *(.data.*)
1.123 + *(.gnu.linkonce.d*)
1.124 + SORT(CONSTRUCTORS)
1.125 + }
1.126 + .data1 : { *(.data1) }
1.127 + .eh_frame : { *(.eh_frame) }
1.128 + .gcc_except_table : { *(.gcc_except_table) }
1.129 + .ctors ALIGN(4):
1.130 + {
1.131 + ___ctors = .;
1.132 + /* gcc uses crtbegin.o to find the start of
1.133 + the constructors, so we make sure it is
1.134 + first. Because this is a wildcard, it
1.135 + doesn't matter if the user does not
1.136 + actually link against crtbegin.o; the
1.137 + linker won't look for a file to match a
1.138 + wildcard. The wildcard also means that it
1.139 + doesn't matter which directory crtbegin.o
1.140 + is in. */
1.141 + KEEP (*crtbegin.o(.ctors))
1.142 + /* We don't want to include the .ctor section from
1.143 + from the crtend.o file until after the sorted ctors.
1.144 + The .ctor section from the crtend file contains the
1.145 + end of ctors marker and it must be last */
1.146 + KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
1.147 + KEEP (*(SORT(.ctors.*)))
1.148 + KEEP (*(.ctors))
1.149 + ___ctors_end = .;
1.150 + }
1.151 + .dtors :
1.152 + {
1.153 + ___dtors = .;
1.154 + KEEP (*crtbegin.o(.dtors))
1.155 + KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
1.156 + KEEP (*(SORT(.dtors.*)))
1.157 + KEEP (*(.dtors))
1.158 + ___dtors_end = .;
1.159 + }
1.160 + .got : { *(.got.plt) *(.got) }
1.161 + .dynamic : { *(.dynamic) }
1.162 + /* We want the small data sections together, so single-instruction offsets
1.163 + can access them all, and initialized data all before uninitialized, so
1.164 + we can shorten the on-disk segment size. */
1.165 + .sdata :
1.166 + {
1.167 + *(.sdata)
1.168 + *(.sdata.*)
1.169 + *(.gnu.linkonce.s.*)
1.170 + }
1.171 + _edata = .;
1.172 + PROVIDE (edata = .);
1.173 + __bss_start = .;
1.174 + .sbss :
1.175 + {
1.176 + *(.dynsbss)
1.177 + *(.sbss)
1.178 + *(.sbss.*)
1.179 + *(.scommon)
1.180 + }
1.181 + .bss :
1.182 + {
1.183 + *(.dynbss)
1.184 + *(.bss)
1.185 + *(.bss.*)
1.186 + *(COMMON)
1.187 + /* Align here to ensure that the .bss section occupies space up to
1.188 + _end. Align after .bss to ensure correct alignment even if the
1.189 + .bss section disappears because there are no input sections. */
1.190 + . = ALIGN(32 / 8);
1.191 + }
1.192 + . = ALIGN(32 / 8);
1.193 + _end = .;
1.194 + PROVIDE (end = .);
1.195 + /* Stabs debugging sections. */
1.196 + .stab 0 : { *(.stab) }
1.197 + .stabstr 0 : { *(.stabstr) }
1.198 + .stab.excl 0 : { *(.stab.excl) }
1.199 + .stab.exclstr 0 : { *(.stab.exclstr) }
1.200 + .stab.index 0 : { *(.stab.index) }
1.201 + .stab.indexstr 0 : { *(.stab.indexstr) }
1.202 + .comment 0 : { *(.comment) }
1.203 + /* DWARF debug sections.
1.204 + Symbols in the DWARF debugging sections are relative to the beginning
1.205 + of the section so we begin them at 0. */
1.206 + /* DWARF 1 */
1.207 + .debug 0 : { *(.debug) }
1.208 + .line 0 : { *(.line) }
1.209 + /* GNU DWARF 1 extensions */
1.210 + .debug_srcinfo 0 : { *(.debug_srcinfo) }
1.211 + .debug_sfnames 0 : { *(.debug_sfnames) }
1.212 + /* DWARF 1.1 and DWARF 2 */
1.213 + .debug_aranges 0 : { *(.debug_aranges) }
1.214 + .debug_pubnames 0 : { *(.debug_pubnames) }
1.215 + /* DWARF 2 */
1.216 + .debug_info 0 : { *(.debug_info) }
1.217 + .debug_abbrev 0 : { *(.debug_abbrev) }
1.218 + .debug_line 0 : { *(.debug_line) }
1.219 + .debug_frame 0 : { *(.debug_frame) }
1.220 + .debug_str 0 : { *(.debug_str) }
1.221 + .debug_loc 0 : { *(.debug_loc) }
1.222 + .debug_macinfo 0 : { *(.debug_macinfo) }
1.223 + /* SGI/MIPS DWARF 2 extensions */
1.224 + .debug_weaknames 0 : { *(.debug_weaknames) }
1.225 + .debug_funcnames 0 : { *(.debug_funcnames) }
1.226 + .debug_typenames 0 : { *(.debug_typenames) }
1.227 + .debug_varnames 0 : { *(.debug_varnames) }
1.228 +/* .stack 0x8c00f400 : { _stack = .; *(.stack) }*/
1.229 + /* These must appear regardless of . */
1.230 + _stack = 0x8d000000;
1.231 +}
.