WII: Update linkscript and fix for linker false error message
This commit is contained in:
parent
b7b5037c50
commit
8bdb40a69c
1 changed files with 26 additions and 5 deletions
|
@ -4,6 +4,8 @@
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc");
|
OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc");
|
||||||
OUTPUT_ARCH(powerpc:common);
|
OUTPUT_ARCH(powerpc:common);
|
||||||
|
EXTERN(_start);
|
||||||
|
ENTRY(_start);
|
||||||
|
|
||||||
PHDRS
|
PHDRS
|
||||||
{
|
{
|
||||||
|
@ -12,14 +14,26 @@ PHDRS
|
||||||
|
|
||||||
SECTIONS
|
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 */
|
/* Program */
|
||||||
.init :
|
.init :
|
||||||
{
|
{
|
||||||
KEEP (*crt0.o(*.init))
|
KEEP (*crt0.o(*.init))
|
||||||
KEEP (*(.init))
|
KEEP (*(.init))
|
||||||
} :plugin = 0
|
} = 0
|
||||||
.plt : { *(.plt) }
|
.plt : { *(.plt) }
|
||||||
.interp : { *(.interp) }
|
.interp : { *(.interp) }
|
||||||
.hash : { *(.hash) }
|
.hash : { *(.hash) }
|
||||||
|
@ -85,7 +99,12 @@ SECTIONS
|
||||||
|
|
||||||
.rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) }
|
.rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) }
|
||||||
.rodata1 : { *(.rodata1) }
|
.rodata1 : { *(.rodata1) }
|
||||||
.sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }
|
.sdata2 : {
|
||||||
|
PROVIDE(_SDA2_BASE_ = .);
|
||||||
|
*(.sdata2)
|
||||||
|
*(.sdata2.*)
|
||||||
|
*(.gnu.linkonce.s2.*)
|
||||||
|
}
|
||||||
.sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }
|
.sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }
|
||||||
/* Adjust the address for the data segment. We want to adjust up to
|
/* Adjust the address for the data segment. We want to adjust up to
|
||||||
the same address within the page on the next page up. */
|
the same address within the page on the next page up. */
|
||||||
|
@ -128,6 +147,7 @@ SECTIONS
|
||||||
KEEP (*(SORT(.ctors.*)))
|
KEEP (*(SORT(.ctors.*)))
|
||||||
KEEP (*(.ctors))
|
KEEP (*(.ctors))
|
||||||
___plugin_ctors_end = .;
|
___plugin_ctors_end = .;
|
||||||
|
. += 10; /* fix for linker false error message */
|
||||||
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
|
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,6 +170,7 @@ SECTIONS
|
||||||
|
|
||||||
.sdata :
|
.sdata :
|
||||||
{
|
{
|
||||||
|
PROVIDE(_SDA_BASE_ = .);
|
||||||
*(.sdata)
|
*(.sdata)
|
||||||
*(.sdata.*)
|
*(.sdata.*)
|
||||||
*(.gnu.linkonce.s.*)
|
*(.gnu.linkonce.s.*)
|
||||||
|
@ -238,7 +259,7 @@ __stack_end = (__bss_start + SIZEOF(.bss));
|
||||||
__intrstack_addr = (__stack_addr + 0x4000);
|
__intrstack_addr = (__stack_addr + 0x4000);
|
||||||
__intrstack_end = (__stack_addr);
|
__intrstack_end = (__stack_addr);
|
||||||
__Arena1Lo = (__intrstack_addr + 31) & (-32);
|
__Arena1Lo = (__intrstack_addr + 31) & (-32);
|
||||||
__Arena1Hi = (0x816ffff0);
|
__Arena1Hi = (0x817FEFF0);
|
||||||
__Arena2Lo = (0x90002000);
|
__Arena2Lo = (0x90002000);
|
||||||
__Arena2Hi = (0x933E0000);
|
__Arena2Hi = (0x933E0000);
|
||||||
|
|
||||||
|
@ -247,7 +268,7 @@ __ipcbufferLo = (0x933e0000);
|
||||||
__ipcbufferHi = (0x93400000);
|
__ipcbufferHi = (0x93400000);
|
||||||
|
|
||||||
/* for backward compatibility with old crt0 */
|
/* for backward compatibility with old crt0 */
|
||||||
PROVIDE (__stack = (0x816ffff0));
|
PROVIDE (__stack = (0x817FEFF0));
|
||||||
|
|
||||||
PROVIDE(__isIPL = __isIPL);
|
PROVIDE(__isIPL = __isIPL);
|
||||||
PROVIDE(__stack_addr = __stack_addr);
|
PROVIDE(__stack_addr = __stack_addr);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue