aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorTony Puccinelli2010-06-22 09:55:40 +0000
committerTony Puccinelli2010-06-22 09:55:40 +0000
commitfd507fdba08bb196d2b8430511aaf7cb6bc0c066 (patch)
treeaf0c37e4729cad0d4d3858aca937aca5a029bad1 /backends
parent38b495aea2c393128ea5263b400b819efec0690e (diff)
downloadscummvm-rg350-fd507fdba08bb196d2b8430511aaf7cb6bc0c066.tar.gz
scummvm-rg350-fd507fdba08bb196d2b8430511aaf7cb6bc0c066.tar.bz2
scummvm-rg350-fd507fdba08bb196d2b8430511aaf7cb6bc0c066.zip
fixed errors in linker scripts that were preventing GP-relative section for small data from working correctly
svn-id: r50138
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/ps2/Makefile.ps22
-rw-r--r--backends/platform/ps2/main_prog.ld6
-rw-r--r--backends/platform/ps2/plugin.ld33
3 files changed, 20 insertions, 21 deletions
diff --git a/backends/platform/ps2/Makefile.ps2 b/backends/platform/ps2/Makefile.ps2
index 7dd4fb9795..c2cf30ed23 100644
--- a/backends/platform/ps2/Makefile.ps2
+++ b/backends/platform/ps2/Makefile.ps2
@@ -77,7 +77,7 @@ DEPDIR = .deps
TARGET = elf/scummvm.elf
-DEFINES += -DUSE_VORBIS -DUSE_TREMOR -DUSE_MAD -DUSE_ZLIB -DFORCE_RTL -DDISABLE_SAVEGAME_SORTING -D_EE -D__PLAYSTATION2__ -G0 -O2 -Wall -Wno-multichar -fno-rtti -fno-exceptions -DNO_ADAPTOR
+DEFINES += -DUSE_VORBIS -DUSE_TREMOR -DUSE_MAD -DUSE_ZLIB -DFORCE_RTL -DDISABLE_SAVEGAME_SORTING -D_EE -D__PLAYSTATION2__ -G2 -O2 -Wall -Wno-multichar -fno-rtti -fno-exceptions -DNO_ADAPTOR
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
diff --git a/backends/platform/ps2/main_prog.ld b/backends/platform/ps2/main_prog.ld
index e807241cee..9dba69c50e 100644
--- a/backends/platform/ps2/main_prog.ld
+++ b/backends/platform/ps2/main_prog.ld
@@ -70,11 +70,10 @@ SECTIONS {
*(.scommon)
}
- /*current PS2 Makefile disables data being put in the gp-relative section,
- but ideally this "plugin hole" is so the plugins can all have global data
+ /*This "plugin hole" is so the plugins can all have global small data
in the same place.*/
__plugin_hole_start = .;
- . = _gp + 0x7ff00;
+ . = _gp + 0x7ff0;
__plugin_hole_end = .;
COMMON :
@@ -87,7 +86,6 @@ SECTIONS {
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b*)
- /* *(COMMON) May have to take this out*/
}
_end_bss = .;
diff --git a/backends/platform/ps2/plugin.ld b/backends/platform/ps2/plugin.ld
index 7198450538..9879413b98 100644
--- a/backends/platform/ps2/plugin.ld
+++ b/backends/platform/ps2/plugin.ld
@@ -51,7 +51,23 @@ SECTIONS {
.rdata ALIGN(128): { *(.rdata) }
.gcc_except_table ALIGN(128): { *(.gcc_except_table) }
- /*We assign the output location counter to the plugin hole made
+ .bss ALIGN(128) : {
+ *(.bss)
+ *(.bss.*)
+ *(.gnu.linkonce.b*)
+ *(COMMON)
+ }
+ _end_bss = .;
+
+ _end = . ;
+ PROVIDE(end = .);
+
+ /* Symbols needed by crt0.s. */
+ PROVIDE(_heap_size = -1);
+ PROVIDE(_stack = -1);
+ PROVIDE(_stack_size = 128 * 1024);
+
+ /*We assign the output location counter to the plugin hole made
in main_prog.ld, then assign the small data sections to the shorts segment*/
. = __plugin_hole_start;
.lit4 ALIGN(128): { *(.lit4) } : shorts
@@ -75,19 +91,4 @@ SECTIONS {
*(.scommon)
}
- .bss ALIGN(128) : {
- *(.bss)
- *(.bss.*)
- *(.gnu.linkonce.b*)
- *(COMMON)
- }
- _end_bss = .;
-
- _end = . ;
- PROVIDE(end = .);
-
- /* Symbols needed by crt0.s. */
- PROVIDE(_heap_size = -1);
- PROVIDE(_stack = -1);
- PROVIDE(_stack_size = 128 * 1024);
}