wut/share/wut.ld

211 lines
4.2 KiB
Plaintext
Raw Normal View History

2018-05-23 00:08:13 +02:00
OUTPUT_FORMAT("elf32-powerpc")
OUTPUT_ARCH(powerpc:common)
MEMORY {
relmem (rw) : ORIGIN = 0x00000000, LENGTH = 32M
codemem (rwx) : ORIGIN = 0x02000000, LENGTH = 224M
datamem (rw) : ORIGIN = 0x10000000, LENGTH = 800M
loadmem (rwx) : ORIGIN = 0xC0000000, LENGTH = 128M
}
2018-05-25 12:31:38 +02:00
EXTERN(_start)
ENTRY(_start)
2018-05-23 00:08:13 +02:00
SECTIONS
{
. = ORIGIN(codemem);
.syscall ALIGN(32) : {
*(.syscall .syscall.*)
} > codemem
.text ALIGN(32) : {
2018-05-25 12:31:38 +02:00
KEEP (*crt0.o(*.init))
KEEP (*(.init))
*(.text)
*(.text.*)
*(.gnu.warning)
*(.gnu.linkonce.t.*)
KEEP (*(.fini))
2018-05-23 00:08:13 +02:00
} > codemem
. = ORIGIN(datamem);
.rodata ALIGN(32) : {
2018-05-25 12:31:38 +02:00
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r.*)
*(.preinit_array)
2018-05-23 00:08:13 +02:00
*(.init_array)
*(.fini_array)
2018-05-25 12:31:38 +02:00
KEEP (*crtbegin.o(.ctors))
KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
KEEP (*(SORT(.ctors.*)))
KEEP (*(.ctors))
KEEP (*crtbegin.o(.dtors))
KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
KEEP (*(SORT(.dtors.*)))
KEEP (*(.dtors))
2018-05-23 00:08:13 +02:00
*(.jcr)
2018-05-25 12:31:38 +02:00
*(.dynamic)
2018-05-23 00:08:13 +02:00
*(.eh_frame_hdr)
2018-05-25 12:31:38 +02:00
KEEP (*(.eh_frame))
*(.fixup)
*(.gcc_except_table)
*(.gcc_except_table.*)
2018-05-23 00:08:13 +02:00
*(.got)
*(.got1)
*(.got2)
2018-05-25 12:31:38 +02:00
*(.got.plt)
*(.plt)
2018-05-23 00:08:13 +02:00
*(.tm_clone_table)
} > datamem
.data ALIGN(32) : {
2018-05-25 12:31:38 +02:00
*(.data)
*(.data.*)
*(.gnu.linkonce.d.*)
SORT(CONSTRUCTORS)
2018-05-23 00:08:13 +02:00
. = ALIGN(32);
__sdata_start = .;
2018-05-25 12:31:38 +02:00
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
. = ALIGN(32);
2018-05-23 00:08:13 +02:00
__sdata_end = .;
__sdata2_start = .;
2018-05-25 12:31:38 +02:00
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*)
. = ALIGN(32);
2018-05-23 00:08:13 +02:00
__sdata2_end = .;
} > datamem
__bss_start = .;
.bss ALIGN(64) : {
2018-05-25 12:31:38 +02:00
*(.dynbss)
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
2018-05-23 00:08:13 +02:00
. = ALIGN(64);
__sbss_start = .;
2018-05-25 12:31:38 +02:00
*(.dynsbss)
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.sb.*)
*(.scommon)
2018-05-23 00:08:13 +02:00
__sbss_end = .;
. = ALIGN(64);
__sbss2_start = .;
2018-05-25 12:31:38 +02:00
*(.sbss2)
*(.sbss2.*)
*(.gnu.linkonce.sb2.*)
2018-05-23 00:08:13 +02:00
__sbss2_end = .;
2018-05-25 12:31:38 +02:00
. = ALIGN(32);
2018-05-23 00:08:13 +02:00
}
__bss_end = .;
. = ORIGIN(relmem);
.rela.text ALIGN(4) : {
2018-05-25 12:31:38 +02:00
*(.rela.text)
*(.rela.text.*)
*(.rela.gnu.linkonce.t.*)
2018-05-23 00:08:13 +02:00
*(.rela.init)
*(.rela.fini)
} > relmem
.rela.data ALIGN(4) : {
2018-05-25 12:31:38 +02:00
*(.rela.data)
*(.rela.data.*)
*(.rela.gnu.linkonce.d.*)
2018-05-23 00:08:13 +02:00
*(.rela.sdata)
2018-05-25 12:31:38 +02:00
*(.rela.gnu.linkonce.s.*)
2018-05-23 00:08:13 +02:00
*(.rela.sdata2)
2018-05-25 12:31:38 +02:00
*(.rela.gnu.linkonce.s2.*)
2018-05-23 00:08:13 +02:00
*(.rela.init_array)
*(.rela.fini_array)
*(.rela.gcc_except_table .rela.gcc_except_table.*)
*(.rela.eh_frame)
2018-05-25 12:31:38 +02:00
*(.rela.got)
*(.rela.got1)
2018-05-23 00:08:13 +02:00
*(.rela.got2)
2018-05-25 12:31:38 +02:00
*(.rela.got.plt)
*(.rela.plt)
2018-05-23 00:08:13 +02:00
} > relmem
.rela.rodata ALIGN(4) : {
2018-05-25 12:31:38 +02:00
*(.rela.rodata)
*(.rela.rodata.*)
*(.rel.gnu.linkonce.r.*)
*(.rela.ctors)
*(.rela.dtors)
2018-05-23 00:08:13 +02:00
} > relmem
. = ORIGIN(loadmem);
.fimport_coreinit ALIGN(16) : {
*(.fimport_coreinit)
} > loadmem
2018-05-23 16:36:35 +02:00
.fimport_gx2 ALIGN(16) : {
*(.fimport_gx2)
} > loadmem
.fimport_nn_ac ALIGN(16) : {
*(.fimport_nn_ac)
} > loadmem
.fimport_nsysnet ALIGN(16) : {
*(.fimport_nsysnet)
} > loadmem
2018-05-23 00:08:13 +02:00
.fimport_proc_ui ALIGN(16) : {
*(.fimport_proc_ui)
} > loadmem
2018-05-23 16:36:35 +02:00
.fimport_sndcore2 ALIGN(16) : {
*(.fimport_sndcore2)
} > loadmem
2018-05-23 00:08:13 +02:00
.fimport_sysapp ALIGN(16) : {
*(.fimport_sysapp)
} > loadmem
2018-05-23 16:36:35 +02:00
.fimport_vpad ALIGN(16) : {
*(.fimport_vpad)
} > loadmem
2018-05-23 00:08:13 +02:00
.dimport_coreinit ALIGN(16) : {
*(.dimport_coreinit)
} > loadmem
2018-05-23 00:08:13 +02:00
.symtab ALIGN(4) : {
*(.symtab)
} > loadmem
.strtab ALIGN(1) : {
*(.strtab)
} > loadmem
.shstrtab ALIGN(1) : {
*(.shstrtab)
} > loadmem
__SDATA_START__ = __sdata_start;
__SBSS_END__ = __sbss_end;
__SDATA2_START__ = __sdata2_start;
__SBSS2_END__ = __sbss2_end;
_SDA_BASE_ = __sbss_end;
_SDA2_BASE_ = __sdata2_start + ((__sbss2_end - __sdata2_start) / 2);
/DISCARD/ : {
2018-05-25 12:31:38 +02:00
*(.abs)
2018-05-23 00:08:13 +02:00
*(.comment)
*(.gnu.attributes)
2018-05-25 12:31:38 +02:00
*(.gnu.version)
*(.gnu.version_d)
*(.gnu.version_r)
2018-05-23 00:08:13 +02:00
}
}