1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/test/dc.x Tue Jan 23 11:21:21 2007 +0000
1.4 +/* Sega Dreamcast linker script */
1.6 +OUTPUT_FORMAT("elf32-shl", "elf32-shl",
1.10 + SEARCH_DIR(/usr/local/dcdev/sh-elf/lib);
1.11 +/* Do we need any of these for elf?
1.16 + ram (rwx) : ORIGIN = 0x8c010000, LENGTH = 0xfe0000
1.21 + /* Read-only sections, merged into text segment: */
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.36 + *(.rel.gnu.linkonce.t*)
1.42 + *(.rela.gnu.linkonce.t*)
1.44 + .rel.fini : { *(.rel.fini) }
1.45 + .rela.fini : { *(.rela.fini) }
1.50 + *(.rel.gnu.linkonce.r*)
1.56 + *(.rela.gnu.linkonce.r*)
1.62 + *(.rel.gnu.linkonce.d*)
1.68 + *(.rela.gnu.linkonce.d*)
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.80 + *(.rel.gnu.linkonce.s*)
1.86 + *(.rela.gnu.linkonce.s*)
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.98 + .plt : { *(.plt) }
1.104 + /* .gnu.warning sections are handled specially by elf32.em. */
1.106 + *(.gnu.linkonce.t*)
1.109 + PROVIDE (etext = .);
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.123 + *(.gnu.linkonce.d*)
1.124 + SORT(CONSTRUCTORS)
1.126 + .data1 : { *(.data1) }
1.127 + .eh_frame : { *(.eh_frame) }
1.128 + .gcc_except_table : { *(.gcc_except_table) }
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.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.149 + ___ctors_end = .;
1.154 + KEEP (*crtbegin.o(.dtors))
1.155 + KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
1.156 + KEEP (*(SORT(.dtors.*)))
1.158 + ___dtors_end = .;
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.169 + *(.gnu.linkonce.s.*)
1.172 + PROVIDE (edata = .);
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.192 + . = ALIGN(32 / 8);
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.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.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;