[Scummvm-cvs-logs] SF.net SVN: scummvm:[49278] scummvm/branches/gsoc2010-plugins/backends/ platform/ps2/main_prog.ld

toneman1138 at users.sourceforge.net toneman1138 at users.sourceforge.net
Fri May 28 01:47:31 CEST 2010


Revision: 49278
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49278&view=rev
Author:   toneman1138
Date:     2010-05-27 23:47:31 +0000 (Thu, 27 May 2010)

Log Message:
-----------
was using the default linker for the psp. Now a modified version of the default linker for the ps2 compiler

Modified Paths:
--------------
    scummvm/branches/gsoc2010-plugins/backends/platform/ps2/main_prog.ld

Modified: scummvm/branches/gsoc2010-plugins/backends/platform/ps2/main_prog.ld
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/platform/ps2/main_prog.ld	2010-05-27 23:23:33 UTC (rev 49277)
+++ scummvm/branches/gsoc2010-plugins/backends/platform/ps2/main_prog.ld	2010-05-27 23:47:31 UTC (rev 49278)
@@ -1,66 +1,59 @@
+/* Script for -z combreloc: combine and sort reloc sections */
 OUTPUT_FORMAT("elf32-littlemips", "elf32-bigmips",
 	      "elf32-littlemips")
-OUTPUT_ARCH(mips:allegrex)
+OUTPUT_ARCH(mips:5900)
 ENTRY(_start)
 /* Do we need any of these for elf?
    __DYNAMIC = 0;    */
+_DYNAMIC_LINK = 0;
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
-  PROVIDE (__executable_start = 0x08900000); . = 0x08900000;
+  . = 0x100000;
   .interp         : { *(.interp) }
-  .reginfo        : { *(.reginfo) }
-  .dynamic        : { *(.dynamic) }
+  .reginfo : { *(.reginfo) }
   .hash           : { *(.hash) }
   .dynsym         : { *(.dynsym) }
   .dynstr         : { *(.dynstr) }
   .gnu.version    : { *(.gnu.version) }
   .gnu.version_d  : { *(.gnu.version_d) }
   .gnu.version_r  : { *(.gnu.version_r) }
-  .rel.init       : { *(.rel.init) }
-  .rela.init      : { *(.rela.init) }
-  .rel.text       : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
-  .rela.text      : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
-  .rel.fini       : { *(.rel.fini) }
-  .rela.fini      : { *(.rela.fini) }
-  /* PSP-specific relocations. TODO: works for PS2 as well? */
-  .rel.sceStub.text   : { *(.rel.sceStub.text) *(SORT(.rel.sceStub.text.*)) }
-  .rel.lib.ent.top    : { *(.rel.lib.ent.top) }
-  .rel.lib.ent        : { *(.rel.lib.ent) }
-  .rel.lib.ent.btm    : { *(.rel.lib.ent.btm) }
-  .rel.lib.stub.top   : { *(.rel.lib.stub.top) }
-  .rel.lib.stub       : { *(.rel.lib.stub) }
-  .rel.lib.stub.btm   : { *(.rel.lib.stub.btm) }
-  .rel.rodata.sceModuleInfo   : { *(.rel.rodata.sceModuleInfo) }
-  .rel.rodata.sceResident     : { *(.rel.rodata.sceResident) }
-  .rel.rodata.sceNid          : { *(.rel.rodata.sceNid) }
-  .rel.rodata.sceVstub        : { *(.rel.rodata.sceVstub) *(SORT(.rel.rodata.sceVstub.*)) }
-  .rel.rodata     : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
-  .rela.rodata    : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
-  .rel.data.rel.ro   : { *(.rel.data.rel.ro*) }
-  .rela.data.rel.ro   : { *(.rel.data.rel.ro*) }
-  .rel.data       : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
-  .rela.data      : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
-  .rel.tdata	  : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
-  .rela.tdata	  : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
-  .rel.tbss	  : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
-  .rela.tbss	  : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
-  .rel.ctors      : { *(.rel.ctors) }
-  .rela.ctors     : { *(.rela.ctors) }
-  .rel.dtors      : { *(.rel.dtors) }
-  .rela.dtors     : { *(.rela.dtors) }
-  .rel.got        : { *(.rel.got) }
-  .rela.got       : { *(.rela.got) }
-  .rel.sdata      : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
-  .rela.sdata     : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
-  .rel.sbss       : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
-  .rela.sbss      : { *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*) }
-  .rel.sdata2     : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
-  .rela.sdata2    : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
-  .rel.sbss2      : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
-  .rela.sbss2     : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
-  .rel.bss        : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
-  .rela.bss       : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
+  .rel.dyn        :
+    {
+      *(.rel.init)
+      *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*)
+      *(.rel.fini)
+      *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*)
+      *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*)
+      *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*)
+      *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*)
+      *(.rel.ctors)
+      *(.rel.dtors)
+      *(.rel.got)
+      *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*)
+      *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*)
+      *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*)
+      *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*)
+      *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*)
+    }
+  .rela.dyn       :
+    {
+      *(.rela.init)
+      *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*)
+      *(.rela.fini)
+      *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*)
+      *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*)
+      *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*)
+      *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*)
+      *(.rela.ctors)
+      *(.rela.dtors)
+      *(.rela.got)
+      *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*)
+      *(.rela.sbss .rela.sbss.* .rela.gnu.linkonce.sb.*)
+      *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*)
+      *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*)
+      *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*)
+    }
   .rel.plt        : { *(.rel.plt) }
   .rela.plt       : { *(.rela.plt) }
   .init           :
@@ -72,7 +65,6 @@
   {
     _ftext = . ;
     *(.text .stub .text.* .gnu.linkonce.t.*)
-    KEEP (*(.text.*personality*))
     /* .gnu.warning sections are handled specially by elf32.em.  */
     *(.gnu.warning)
     *(.mips16.fn.*) *(.mips16.call.*)
@@ -81,56 +73,43 @@
   {
     KEEP (*(.fini))
   } =0
-  /* PSP library stub functions. TODO: works for PS2 as well? */
-  .sceStub.text     : { *(.sceStub.text) *(SORT(.sceStub.text.*)) }
   PROVIDE (__etext = .);
   PROVIDE (_etext = .);
   PROVIDE (etext = .);
-  /* PSP library entry table and library stub table. TODO: works for PS2 as well? */
-  .lib.ent.top    : { *(.lib.ent.top) }
-  .lib.ent        : { *(.lib.ent) }
-  .lib.ent.btm    : { *(.lib.ent.btm) }
-  .lib.stub.top   : { *(.lib.stub.top) }
-  .lib.stub       : { *(.lib.stub) }
-  .lib.stub.btm   : { *(.lib.stub.btm) }
-  /* PSP read-only data for module info, NIDs, and Vstubs.  The
-     .rodata.sceModuleInfo section must appear before the .rodata section
-     otherwise it would get absorbed into .rodata and the PSP bootloader
-     would be unable to locate the module info structure. TODO: Works for PS2 as well? */
-  .rodata.sceModuleInfo    : { *(.rodata.sceModuleInfo) }
-  .rodata.sceResident      : { *(.rodata.sceResident) }
-  .rodata.sceNid           : { *(.rodata.sceNid) }
-  .rodata.sceVstub         : { *(.rodata.sceVstub) *(SORT(.rodata.sceVstub.*)) }
   .rodata         : { *(.rodata .rodata.* .gnu.linkonce.r.*) }
   .rodata1        : { *(.rodata1) }
   .sdata2         : { *(.sdata2 .sdata2.* .gnu.linkonce.s2.*) }
   .sbss2          : { *(.sbss2 .sbss2.* .gnu.linkonce.sb2.*) }
   .eh_frame_hdr : { *(.eh_frame_hdr) }
-  .eh_frame       : ONLY_IF_RO { KEEP (*(.eh_frame)) }
-  .gcc_except_table   : ONLY_IF_RO { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
   /* Adjust the address for the data segment.  We want to adjust up to
      the same address within the page on the next page up.  */
-  . = ALIGN(256) + (. & (256 - 1));
-  /* Exception handling  */
-  .eh_frame       : ONLY_IF_RW { KEEP (*(.eh_frame)) }
-  .gcc_except_table   : ONLY_IF_RW { KEEP (*(.gcc_except_table)) *(.gcc_except_table.*) }
-  /* Thread Local Storage sections  */
-  .tdata	  : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
-  .tbss		  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
+  . = ALIGN(128) + (. & (128 - 1));
   /* Ensure the __preinit_array_start label is properly aligned.  We
      could instead move the label definition inside the section, but
      the linker would then create the section even if it turns out to
      be empty, which isn't pretty.  */
   . = ALIGN(32 / 8);
   PROVIDE (__preinit_array_start = .);
-  .preinit_array     : { KEEP (*(.preinit_array)) }
+  .preinit_array     : { *(.preinit_array) }
   PROVIDE (__preinit_array_end = .);
   PROVIDE (__init_array_start = .);
-  .init_array     : { KEEP (*(.init_array)) }
+  .init_array     : { *(.init_array) }
   PROVIDE (__init_array_end = .);
   PROVIDE (__fini_array_start = .);
-  .fini_array     : { KEEP (*(.fini_array)) }
+  .fini_array     : { *(.fini_array) }
   PROVIDE (__fini_array_end = .);
+  .data           :
+  {
+    _fdata = . ;
+    *(.data .data.* .gnu.linkonce.d.*)
+    SORT(CONSTRUCTORS)
+  }
+  .data1          : { *(.data1) }
+  .tdata	  : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
+  .tbss		  : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
+  .eh_frame       : { KEEP (*(.eh_frame)) }
+  .gcc_except_table   : { *(.gcc_except_table) }
+  .dynamic        : { *(.dynamic) }
   .ctors          :
   {
     /* gcc uses crtbegin.o to find the start of
@@ -159,18 +138,10 @@
     KEEP (*(.dtors))
   }
   .jcr            : { KEEP (*(.jcr)) }
-  .data.rel.ro : { *(.data.rel.ro.local) *(.data.rel.ro*) }
-  .data           :
-  {
-    _fdata = . ;
-    *(.data .data.* .gnu.linkonce.d.*)
-    KEEP (*(.gnu.linkonce.d.*personality*))
-    SORT(CONSTRUCTORS)
-  }
-  .data1          : { *(.data1) }
-  . = .;
   _gp = ALIGN(16) + 0x7ff0;
   .got            : { *(.got.plt) *(.got) }
+  .lit8 : { *(.lit8) }
+  .lit4 : { *(.lit4) }
   /* We want the small data sections together, so single-instruction offsets
      can access them all, and initialized data all before uninitialized, so
      we can shorten the on-disk segment size.  */
@@ -178,8 +149,6 @@
   {
     *(.sdata .sdata.* .gnu.linkonce.s.*)
   }
-  .lit8           : { *(.lit8) }
-  .lit4           : { *(.lit4) }
   _edata = .;
   PROVIDE (edata = .);
   __bss_start = .;
@@ -248,6 +217,6 @@
   .debug_funcnames 0 : { *(.debug_funcnames) }
   .debug_typenames 0 : { *(.debug_typenames) }
   .debug_varnames  0 : { *(.debug_varnames) }
-  /DISCARD/ : { *(.comment) *(.pdr) }
-  /DISCARD/ : { *(.note.GNU-stack) }
+  .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
+  .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list