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

toneman1138 at users.sourceforge.net toneman1138 at users.sourceforge.net
Thu Jun 3 02:46:25 CEST 2010


Revision: 49399
          http://scummvm.svn.sourceforge.net/scummvm/?rev=49399&view=rev
Author:   toneman1138
Date:     2010-06-03 00:46:24 +0000 (Thu, 03 Jun 2010)

Log Message:
-----------
compiles with modified linker when dynamic plugins turned off now

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

Modified: scummvm/branches/gsoc2010-plugins/backends/platform/ps2/Makefile.ps2
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/platform/ps2/Makefile.ps2	2010-06-02 18:19:45 UTC (rev 49398)
+++ scummvm/branches/gsoc2010-plugins/backends/platform/ps2/Makefile.ps2	2010-06-03 00:46:24 UTC (rev 49399)
@@ -6,9 +6,9 @@
 PS2_EXTRA_LIBS = /zlib/lib /libmad/ee/lib /SjPcm/ee/lib /vorbis /tremor/tremor
 
 # Set to 1 to enable, 0 to disable dynamic modules
-DYNAMIC_MODULES = 1
+DYNAMIC_MODULES = 0
 
-VERBOSE_BUILD=1
+VERBOSE_BUILD=0
 
 # Test for dynamic plugins
 ifeq ($(DYNAMIC_MODULES),1)
@@ -58,13 +58,14 @@
 
 srcdir = ../../..
 VPATH = $(srcdir)
-INCDIR = ../../../
-# DEPDIR = .deps
+INCDIR = $(srcdir)
+#DEPDIR = .deps
+#CXX_UPDATE_DEP_FLAG = -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d,-MQ,"$@",-MP
 
 DEFINES  = -DUSE_VORBIS -DUSE_MAD -DUSE_TREMOR -DUSE_ZLIB -DFORCE_RTL -D_EE -D__PLAYSTATION2__ -O2 -Wall -Wno-multichar
 
-INCLUDES  = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS)) 
-INCLUDES += -I $(PS2SDK)/ee/include -I $(PS2SDK)/common/include -I ./common -I . -I $(srcdir) -I $(srcdir)/engines -I $(srcdir)/backends/platform/ps2
+INCLUDES = $(addprefix -I$(PS2_EXTRA),$(PS2_EXTRA_INCS)) 
+INCLUDES += -I $(PS2SDK)/ee/include -I $(PS2SDK)/common/include -I ./common -I . -I $(srcdir) -I $(srcdir)/engines
 
 TARGET = elf/scummvm.elf
 
@@ -86,23 +87,23 @@
 	backends/platform/ps2/ps2debug.o \
 	backends/platform/ps2/ps2loader.o
     
-MODULE_DIRS += .
+MODULE_DIRS += ./
 
 include $(srcdir)/Makefile.common
 
-LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Tmain_prog.ld
+# Variables for dynamic plugin building
+PLUGIN_PREFIX =
+PLUGIN_SUFFIX = .plg
+PLUGIN_EXTRA_DEPS = plugin.syms scummvm-ps2.elf
+PLUGIN_LDFLAGS = -nostartfiles -Wl,-q,--just-symbols=scummvm-ps2.org.elf,-Tplugin.ld,--export-dynamic,--retain-symbols-file,plugin.syms -lstdc++ -lc
+
+LDFLAGS += -mno-crt0 $(PS2SDK)/ee/startup/crt0.o -Wl,-Tmain_prog.ld
 LDFLAGS += -L $(PS2SDK)/ee/lib -L .
 LDFLAGS += $(addprefix -L$(PS2_EXTRA),$(PS2_EXTRA_LIBS)) 
 LDFLAGS += -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lmad -ltremor -lz -lm -lc -lfileXio -lkernel -lstdc++
 LDFLAGS += -s
 
-# Variables for dynamic plugin building
-PLUGIN_PREFIX =
-PLUGIN_SUFFIX = .plg
-PLUGIN_EXTRA_DEPS = plugin.ld plugin.syms
-PLUGIN_LDFLAGS = -nostartfiles -Wl,-q, -Tplugin.ld, --retain-symbols-file,plugin.syms -lstdc++ -lc
-
 all: $(TARGET)
 
 $(TARGET): $(OBJS)
-	$(LD) $^ $(LDFLAGS) -o $@
+	$(LD) $(PRE_OBJS_FLAGS) $(OBJS) $(POST_OBJS_FLAGS) $(LDFLAGS) -o $@

Modified: scummvm/branches/gsoc2010-plugins/backends/platform/ps2/main_prog.ld
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/platform/ps2/main_prog.ld	2010-06-02 18:19:45 UTC (rev 49398)
+++ scummvm/branches/gsoc2010-plugins/backends/platform/ps2/main_prog.ld	2010-06-03 00:46:24 UTC (rev 49399)
@@ -219,4 +219,10 @@
   .debug_varnames  0 : { *(.debug_varnames) }
   .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
   .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
+
+  	/* Symbols needed by crt0.s.  */
+  PROVIDE(_heap_size = -1);
+  PROVIDE(_stack = -1);
+  PROVIDE(_stack_size = 128 * 1024);
+
 }

Modified: scummvm/branches/gsoc2010-plugins/backends/platform/ps2/plugin.ld
===================================================================
--- scummvm/branches/gsoc2010-plugins/backends/platform/ps2/plugin.ld	2010-06-02 18:19:45 UTC (rev 49398)
+++ scummvm/branches/gsoc2010-plugins/backends/platform/ps2/plugin.ld	2010-06-03 00:46:24 UTC (rev 49399)
@@ -2,20 +2,22 @@
 OUTPUT_FORMAT("elf32-littlemips", "elf32-bigmips",
 	      "elf32-littlemips")
 OUTPUT_ARCH(mips:5900)
+SEARCH_DIR("/home/tony/GSOC/ps2/tools/ee/ee/lib");
 PHDRS
 {
   plugin PT_LOAD ;
   shorts PT_LOAD ;
 }
 /* Do we need any of these for elf?
-   __DYNAMIC = 0;    */
-_DYNAMIC_LINK = 0;
+   __DYNAMIC = 0;    
+_DYNAMIC_LINK = 0; */
 SECTIONS
 {
   /* Read-only sections, merged into text segment: */
-  . = 0; //Not sure this shouldn't be 0x100000
-  .interp         : { *(.interp) } plugin
-  .reginfo 	  : { *(.reginfo) } plugin
+  . = 0x100000;
+  .interp         : { *(.interp) } : plugin
+  .reginfo 	  : { *(.reginfo) } : plugin
+  .dynamic	  : { *(.dynamic) }
   .hash           : { *(.hash) }
   .dynsym         : { *(.dynsym) }
   .dynstr         : { *(.dynstr) }
@@ -129,8 +131,10 @@
     ___plugin_dtors_end = .;
   }
   .jcr            : { KEEP (*(.jcr)) }
+
   . = __plugin_hole_start;
-  .got            : { *(.got.plt) *(.got) } shorts
+
+  .got            : { *(.got.plt) *(.got) } : shorts
   .lit8 : { *(.lit8) }
   .lit4 : { *(.lit4) }
   /* We want the small data sections together, so single-instruction offsets
@@ -202,4 +206,9 @@
   .debug_varnames  0 : { *(.debug_varnames) }
   .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
   .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
+
+  /* Symbols needed by crt0.s */
+  PROVIDE(_heap_size = -1);
+  PROVIDE(_stack = -1);
+  PROVIDE(_stack_size = 128 * 1024);
 }


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