[Scummvm-git-logs] scummvm branch-2-2 -> 8bdb40a69cbfd32e05d82d5faf209c76eb80c7c0
AReim1982
alexander at areim.de
Mon Oct 19 09:26:26 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
8bdb40a69c WII: Update linkscript and fix for linker false error message
Commit: 8bdb40a69cbfd32e05d82d5faf209c76eb80c7c0
https://github.com/scummvm/scummvm/commit/8bdb40a69cbfd32e05d82d5faf209c76eb80c7c0
Author: Alexander Reim (alexander at areim.de)
Date: 2020-10-19T11:25:59+02:00
Commit Message:
WII: Update linkscript and fix for linker false error message
Changed paths:
backends/plugins/wii/plugin.ld
diff --git a/backends/plugins/wii/plugin.ld b/backends/plugins/wii/plugin.ld
index 61b90d3394..b64fef7f81 100644
--- a/backends/plugins/wii/plugin.ld
+++ b/backends/plugins/wii/plugin.ld
@@ -4,6 +4,8 @@
OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc");
OUTPUT_ARCH(powerpc:common);
+EXTERN(_start);
+ENTRY(_start);
PHDRS
{
@@ -12,14 +14,26 @@ PHDRS
SECTIONS
{
- . = 0x81000000;
+ /* stub is loaded at physical address 0x00003400 (though both 0x80003400 and 0x00003400 are equivalent for IOS) */
+ /* This can also be used to load an arbitrary standalone stub at an arbitrary address in memory, for any purpose */
+ /* Use -Wl,--section-start,.stub=0xADDRESS to change */
+ . = 0x00003400;
+
+ .stub :
+ {
+ KEEP(*(.stub))
+ } :plugin = 0
+
+ /* default base address */
+ /* use -Wl,--section-start,.init=0xADDRESS to change */
+ . = 0x80004000;
/* Program */
.init :
{
KEEP (*crt0.o(*.init))
KEEP (*(.init))
- } :plugin = 0
+ } = 0
.plt : { *(.plt) }
.interp : { *(.interp) }
.hash : { *(.hash) }
@@ -85,7 +99,12 @@ SECTIONS
.rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) }
.rodata1 : { *(.rodata1) }
- .sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }
+ .sdata2 : {
+ PROVIDE(_SDA2_BASE_ = .);
+ *(.sdata2)
+ *(.sdata2.*)
+ *(.gnu.linkonce.s2.*)
+ }
.sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
@@ -128,6 +147,7 @@ SECTIONS
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
___plugin_ctors_end = .;
+ . += 10; /* fix for linker false error message */
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
}
@@ -150,6 +170,7 @@ SECTIONS
.sdata :
{
+ PROVIDE(_SDA_BASE_ = .);
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
@@ -238,7 +259,7 @@ __stack_end = (__bss_start + SIZEOF(.bss));
__intrstack_addr = (__stack_addr + 0x4000);
__intrstack_end = (__stack_addr);
__Arena1Lo = (__intrstack_addr + 31) & (-32);
-__Arena1Hi = (0x816ffff0);
+__Arena1Hi = (0x817FEFF0);
__Arena2Lo = (0x90002000);
__Arena2Hi = (0x933E0000);
@@ -247,7 +268,7 @@ __ipcbufferLo = (0x933e0000);
__ipcbufferHi = (0x93400000);
/* for backward compatibility with old crt0 */
-PROVIDE (__stack = (0x816ffff0));
+PROVIDE (__stack = (0x817FEFF0));
PROVIDE(__isIPL = __isIPL);
PROVIDE(__stack_addr = __stack_addr);
More information about the Scummvm-git-logs
mailing list