Minor linkscript cleanup

This commit is contained in:
fincs 2021-01-23 18:16:19 +01:00
parent 4edc8271be
commit d04f68f8b1
No known key found for this signature in database
GPG Key ID: 62C7609ADA219C60
3 changed files with 16 additions and 33 deletions

View File

@ -3,6 +3,7 @@
.extern __init_wut
.extern __fini_wut
.section .crt0, "ax", @progbits
.global __rpl_start
__rpl_start:
stwu 1, -0x14(1)

View File

@ -3,6 +3,7 @@
.extern __init_wut
.extern __fini_wut
.section .crt0, "ax", @progbits
.global __rpx_start
__rpx_start:
stwu 1, -0x14(1)

View File

@ -17,7 +17,7 @@ SECTIONS
} > codemem
.text ALIGN(32) : {
KEEP (*crt0.o(*.init))
KEEP (*(.crt0))
KEEP (*(.init))
*(.text)
@ -30,6 +30,14 @@ SECTIONS
. = ORIGIN(datamem);
.rodata : {
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*)
*(.sbss2)
*(.sbss2.*)
*(.gnu.linkonce.sb2.*)
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r.*)
@ -69,42 +77,24 @@ SECTIONS
*(.gnu.linkonce.d.*)
SORT(CONSTRUCTORS)
__sdata_start = .;
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
__sdata_end = .;
__sdata2_start = .;
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*)
__sdata2_end = .;
} > datamem
__bss_start = .;
.bss (NOLOAD) : {
*(.dynbss)
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
__sbss_start = .;
*(.dynsbss)
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.sb.*)
*(.scommon)
__sbss_end = .;
__sbss2_start = .;
*(.sbss2)
*(.sbss2.*)
*(.gnu.linkonce.sb2.*)
__sbss2_end = .;
*(.dynbss)
*(.bss)
*(.bss.*)
*(.gnu.linkonce.b.*)
*(COMMON)
} > datamem
__bss_end = .;
. = ORIGIN(loadmem);
.fexports ALIGN(32) : { KEEP( *(.fexports) ) } > loadmem
@ -400,15 +390,6 @@ SECTIONS
*(.dimport_nn_uds.*)
} > 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/ : {
*(.abs)
*(.comment)