Search
lxdream.org :: lxdream/test/dc.x
lxdream 0.9.1
released Jun 29
Download Now
filename test/dc.x
changeset 185:6755a04c447f
next1169:23a9613aceb1
author nkeynes
date Tue Jul 11 01:35:27 2006 +0000 (14 years ago)
permissions -rw-r--r--
last change First commit of system test framework. 3 initial test cases (incomplete):
testide, testmath, and testta
file annotate diff log raw
nkeynes@185
     1
/* Sega Dreamcast linker script */
nkeynes@185
     2
nkeynes@185
     3
OUTPUT_FORMAT("elf32-shl", "elf32-shl",
nkeynes@185
     4
	      "elf32-shl")
nkeynes@185
     5
OUTPUT_ARCH(sh)
nkeynes@185
     6
ENTRY(start)
nkeynes@185
     7
 SEARCH_DIR(/usr/local/dcdev/sh-elf/lib);
nkeynes@185
     8
/* Do we need any of these for elf?
nkeynes@185
     9
   __DYNAMIC = 0;    */
nkeynes@185
    10
nkeynes@185
    11
MEMORY
nkeynes@185
    12
{
nkeynes@185
    13
  ram (rwx) : ORIGIN = 0x8c010000, LENGTH = 0xfe0000
nkeynes@185
    14
}
nkeynes@185
    15
nkeynes@185
    16
SECTIONS
nkeynes@185
    17
{
nkeynes@185
    18
  /* Read-only sections, merged into text segment: */
nkeynes@185
    19
/*  . = 0x1000;*/
nkeynes@185
    20
  .interp     : { *(.interp) 	}
nkeynes@185
    21
  .hash          : { *(.hash)		}
nkeynes@185
    22
  .dynsym        : { *(.dynsym)		}
nkeynes@185
    23
  .dynstr        : { *(.dynstr)		}
nkeynes@185
    24
  .gnu.version   : { *(.gnu.version)	}
nkeynes@185
    25
  .gnu.version_d   : { *(.gnu.version_d)	}
nkeynes@185
    26
  .gnu.version_r   : { *(.gnu.version_r)	}
nkeynes@185
    27
  .rel.init      : { *(.rel.init)	}
nkeynes@185
    28
  .rela.init     : { *(.rela.init)	}
nkeynes@185
    29
  .rel.text      :
nkeynes@185
    30
    {
nkeynes@185
    31
      *(.rel.text)
nkeynes@185
    32
      *(.rel.text.*)
nkeynes@185
    33
      *(.rel.gnu.linkonce.t*)
nkeynes@185
    34
    }
nkeynes@185
    35
  .rela.text     :
nkeynes@185
    36
    {
nkeynes@185
    37
      *(.rela.text)
nkeynes@185
    38
      *(.rela.text.*)
nkeynes@185
    39
      *(.rela.gnu.linkonce.t*)
nkeynes@185
    40
    }
nkeynes@185
    41
  .rel.fini      : { *(.rel.fini)	}
nkeynes@185
    42
  .rela.fini     : { *(.rela.fini)	}
nkeynes@185
    43
  .rel.rodata    :
nkeynes@185
    44
    {
nkeynes@185
    45
      *(.rel.rodata)
nkeynes@185
    46
      *(.rel.rodata.*)
nkeynes@185
    47
      *(.rel.gnu.linkonce.r*)
nkeynes@185
    48
    }
nkeynes@185
    49
  .rela.rodata   :
nkeynes@185
    50
    {
nkeynes@185
    51
      *(.rela.rodata)
nkeynes@185
    52
      *(.rela.rodata.*)
nkeynes@185
    53
      *(.rela.gnu.linkonce.r*)
nkeynes@185
    54
    }
nkeynes@185
    55
  .rel.data      :
nkeynes@185
    56
    {
nkeynes@185
    57
      *(.rel.data)
nkeynes@185
    58
      *(.rel.data.*)
nkeynes@185
    59
      *(.rel.gnu.linkonce.d*)
nkeynes@185
    60
    }
nkeynes@185
    61
  .rela.data     :
nkeynes@185
    62
    {
nkeynes@185
    63
      *(.rela.data)
nkeynes@185
    64
      *(.rela.data.*)
nkeynes@185
    65
      *(.rela.gnu.linkonce.d*)
nkeynes@185
    66
    }
nkeynes@185
    67
  .rel.ctors     : { *(.rel.ctors)	}
nkeynes@185
    68
  .rela.ctors    : { *(.rela.ctors)	}
nkeynes@185
    69
  .rel.dtors     : { *(.rel.dtors)	}
nkeynes@185
    70
  .rela.dtors    : { *(.rela.dtors)	}
nkeynes@185
    71
  .rel.got       : { *(.rel.got)		}
nkeynes@185
    72
  .rela.got      : { *(.rela.got)		}
nkeynes@185
    73
  .rel.sdata     :
nkeynes@185
    74
    {
nkeynes@185
    75
      *(.rel.sdata)
nkeynes@185
    76
      *(.rel.sdata.*)
nkeynes@185
    77
      *(.rel.gnu.linkonce.s*)
nkeynes@185
    78
    }
nkeynes@185
    79
  .rela.sdata     :
nkeynes@185
    80
    {
nkeynes@185
    81
      *(.rela.sdata)
nkeynes@185
    82
      *(.rela.sdata.*)
nkeynes@185
    83
      *(.rela.gnu.linkonce.s*)
nkeynes@185
    84
    }
nkeynes@185
    85
  .rel.sbss      : { *(.rel.sbss)		}
nkeynes@185
    86
  .rela.sbss     : { *(.rela.sbss)	}
nkeynes@185
    87
  .rel.bss       : { *(.rel.bss)		}
nkeynes@185
    88
  .rela.bss      : { *(.rela.bss)		}
nkeynes@185
    89
  .rel.plt       : { *(.rel.plt)		}
nkeynes@185
    90
  .rela.plt      : { *(.rela.plt)		}
nkeynes@185
    91
  .init          : 
nkeynes@185
    92
  { 
nkeynes@185
    93
    KEEP (*(.init))
nkeynes@185
    94
  } =0
nkeynes@185
    95
  .plt      : { *(.plt)	}
nkeynes@185
    96
  .text      :
nkeynes@185
    97
  {
nkeynes@185
    98
    *(.text)
nkeynes@185
    99
    *(.text.*)
nkeynes@185
   100
    *(.stub)
nkeynes@185
   101
    /* .gnu.warning sections are handled specially by elf32.em.  */
nkeynes@185
   102
    *(.gnu.warning)
nkeynes@185
   103
    *(.gnu.linkonce.t*)
nkeynes@185
   104
  } =0
nkeynes@185
   105
  _etext = .;
nkeynes@185
   106
  PROVIDE (etext = .);
nkeynes@185
   107
  .fini      :
nkeynes@185
   108
  {
nkeynes@185
   109
    KEEP (*(.fini))
nkeynes@185
   110
  } =0
nkeynes@185
   111
  .rodata   : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r*) }
nkeynes@185
   112
  .rodata1   : { *(.rodata1) }
nkeynes@185
   113
  /* Adjust the address for the data segment.  We want to adjust up to
nkeynes@185
   114
     the same address within the page on the next page up.  */
nkeynes@185
   115
  . = ALIGN(128) + (. & (128 - 1));
nkeynes@185
   116
  .data    :
nkeynes@185
   117
  {
nkeynes@185
   118
    *(.data)
nkeynes@185
   119
    *(.data.*)
nkeynes@185
   120
    *(.gnu.linkonce.d*)
nkeynes@185
   121
    SORT(CONSTRUCTORS)
nkeynes@185
   122
  }
nkeynes@185
   123
  .data1   : { *(.data1) }
nkeynes@185
   124
  .eh_frame : { *(.eh_frame) }
nkeynes@185
   125
  .gcc_except_table : { *(.gcc_except_table) }
nkeynes@185
   126
  .ctors   ALIGN(4): 
nkeynes@185
   127
  {
nkeynes@185
   128
    ___ctors = .;
nkeynes@185
   129
    /* gcc uses crtbegin.o to find the start of
nkeynes@185
   130
       the constructors, so we make sure it is
nkeynes@185
   131
       first.  Because this is a wildcard, it
nkeynes@185
   132
       doesn't matter if the user does not
nkeynes@185
   133
       actually link against crtbegin.o; the
nkeynes@185
   134
       linker won't look for a file to match a
nkeynes@185
   135
       wildcard.  The wildcard also means that it
nkeynes@185
   136
       doesn't matter which directory crtbegin.o
nkeynes@185
   137
       is in.  */
nkeynes@185
   138
    KEEP (*crtbegin.o(.ctors))
nkeynes@185
   139
    /* We don't want to include the .ctor section from
nkeynes@185
   140
       from the crtend.o file until after the sorted ctors.
nkeynes@185
   141
       The .ctor section from the crtend file contains the
nkeynes@185
   142
       end of ctors marker and it must be last */
nkeynes@185
   143
    KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
nkeynes@185
   144
    KEEP (*(SORT(.ctors.*)))
nkeynes@185
   145
    KEEP (*(.ctors))
nkeynes@185
   146
    ___ctors_end = .;
nkeynes@185
   147
  }
nkeynes@185
   148
   .dtors         :
nkeynes@185
   149
  {
nkeynes@185
   150
    ___dtors = .;
nkeynes@185
   151
    KEEP (*crtbegin.o(.dtors))
nkeynes@185
   152
    KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
nkeynes@185
   153
    KEEP (*(SORT(.dtors.*)))
nkeynes@185
   154
    KEEP (*(.dtors))
nkeynes@185
   155
    ___dtors_end = .;
nkeynes@185
   156
  }
nkeynes@185
   157
  .got           : { *(.got.plt) *(.got) }
nkeynes@185
   158
  .dynamic       : { *(.dynamic) }
nkeynes@185
   159
  /* We want the small data sections together, so single-instruction offsets
nkeynes@185
   160
     can access them all, and initialized data all before uninitialized, so
nkeynes@185
   161
     we can shorten the on-disk segment size.  */
nkeynes@185
   162
  .sdata     : 
nkeynes@185
   163
  {
nkeynes@185
   164
    *(.sdata) 
nkeynes@185
   165
    *(.sdata.*)
nkeynes@185
   166
    *(.gnu.linkonce.s.*)
nkeynes@185
   167
  }
nkeynes@185
   168
  _edata = .;
nkeynes@185
   169
  PROVIDE (edata = .);
nkeynes@185
   170
  __bss_start = .;
nkeynes@185
   171
  .sbss      :
nkeynes@185
   172
  {
nkeynes@185
   173
    *(.dynsbss)
nkeynes@185
   174
    *(.sbss)
nkeynes@185
   175
    *(.sbss.*)
nkeynes@185
   176
    *(.scommon)
nkeynes@185
   177
  }
nkeynes@185
   178
  .bss       :
nkeynes@185
   179
  {
nkeynes@185
   180
   *(.dynbss)
nkeynes@185
   181
   *(.bss)
nkeynes@185
   182
   *(.bss.*)
nkeynes@185
   183
   *(COMMON)
nkeynes@185
   184
   /* Align here to ensure that the .bss section occupies space up to
nkeynes@185
   185
      _end.  Align after .bss to ensure correct alignment even if the
nkeynes@185
   186
      .bss section disappears because there are no input sections.  */
nkeynes@185
   187
   . = ALIGN(32 / 8);
nkeynes@185
   188
  }
nkeynes@185
   189
  . = ALIGN(32 / 8);
nkeynes@185
   190
  _end = .;
nkeynes@185
   191
  PROVIDE (end = .);
nkeynes@185
   192
  /* Stabs debugging sections.  */
nkeynes@185
   193
  .stab 0 : { *(.stab) }
nkeynes@185
   194
  .stabstr 0 : { *(.stabstr) }
nkeynes@185
   195
  .stab.excl 0 : { *(.stab.excl) }
nkeynes@185
   196
  .stab.exclstr 0 : { *(.stab.exclstr) }
nkeynes@185
   197
  .stab.index 0 : { *(.stab.index) }
nkeynes@185
   198
  .stab.indexstr 0 : { *(.stab.indexstr) }
nkeynes@185
   199
  .comment 0 : { *(.comment) }
nkeynes@185
   200
  /* DWARF debug sections.
nkeynes@185
   201
     Symbols in the DWARF debugging sections are relative to the beginning
nkeynes@185
   202
     of the section so we begin them at 0.  */
nkeynes@185
   203
  /* DWARF 1 */
nkeynes@185
   204
  .debug          0 : { *(.debug) }
nkeynes@185
   205
  .line           0 : { *(.line) }
nkeynes@185
   206
  /* GNU DWARF 1 extensions */
nkeynes@185
   207
  .debug_srcinfo  0 : { *(.debug_srcinfo) }
nkeynes@185
   208
  .debug_sfnames  0 : { *(.debug_sfnames) }
nkeynes@185
   209
  /* DWARF 1.1 and DWARF 2 */
nkeynes@185
   210
  .debug_aranges  0 : { *(.debug_aranges) }
nkeynes@185
   211
  .debug_pubnames 0 : { *(.debug_pubnames) }
nkeynes@185
   212
  /* DWARF 2 */
nkeynes@185
   213
  .debug_info     0 : { *(.debug_info) }
nkeynes@185
   214
  .debug_abbrev   0 : { *(.debug_abbrev) }
nkeynes@185
   215
  .debug_line     0 : { *(.debug_line) }
nkeynes@185
   216
  .debug_frame    0 : { *(.debug_frame) }
nkeynes@185
   217
  .debug_str      0 : { *(.debug_str) }
nkeynes@185
   218
  .debug_loc      0 : { *(.debug_loc) }
nkeynes@185
   219
  .debug_macinfo  0 : { *(.debug_macinfo) }
nkeynes@185
   220
  /* SGI/MIPS DWARF 2 extensions */
nkeynes@185
   221
  .debug_weaknames 0 : { *(.debug_weaknames) }
nkeynes@185
   222
  .debug_funcnames 0 : { *(.debug_funcnames) }
nkeynes@185
   223
  .debug_typenames 0 : { *(.debug_typenames) }
nkeynes@185
   224
  .debug_varnames  0 : { *(.debug_varnames) }
nkeynes@185
   225
/*  .stack 0x8c00f400 : { _stack = .; *(.stack) }*/
nkeynes@185
   226
  /* These must appear regardless of  .  */
nkeynes@185
   227
  _stack = 0x8d000000;
nkeynes@185
   228
}
.