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