From 511afefc0d91d603d45aa02678347095b807db6c Mon Sep 17 00:00:00 2001 From: santiago046 <88282401+santiago046@users.noreply.github.com> Date: Thu, 11 Jun 2026 21:56:58 +0000 Subject: [PATCH 1/2] Fix "no sceModuleInfo section found" when linking with --gc-sections --- src/base/linkfile.prx.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/linkfile.prx.in b/src/base/linkfile.prx.in index 18c5946e10..73f17b075a 100644 --- a/src/base/linkfile.prx.in +++ b/src/base/linkfile.prx.in @@ -98,7 +98,7 @@ SECTIONS .rodata.sceModuleInfo section must appear before the .rodata section otherwise it would get absorbed into .rodata and the PSP bootloader would be unable to locate the module info structure. */ - .rodata.sceModuleInfo : { *(.rodata.sceModuleInfo) } + .rodata.sceModuleInfo : { KEEP (*(.rodata.sceModuleInfo)) } .rodata.sceResident : { *(.rodata.sceResident) } .rodata.sceNid : { KEEP (*(.rodata.sceNid)) } .rodata.sceVstub : { *(.rodata.sceVstub) *(SORT(.rodata.sceVstub.*)) } From b9b814f7ea50625b628d0a63827f056071ad8012 Mon Sep 17 00:00:00 2001 From: santiago046 <88282401+santiago046@users.noreply.github.com> Date: Thu, 11 Jun 2026 22:46:09 +0000 Subject: [PATCH 2/2] Fix "Error, size of text section and nid section do not match" with `-flto` + `--gc-sections`. --- src/base/linkfile.prx.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/linkfile.prx.in b/src/base/linkfile.prx.in index 73f17b075a..3023d21de7 100644 --- a/src/base/linkfile.prx.in +++ b/src/base/linkfile.prx.in @@ -83,7 +83,7 @@ SECTIONS KEEP (*(.fini)) } =0 /* PSP library stub functions. */ - .sceStub.text : { *(.sceStub.text) *(SORT(.sceStub.text.*)) } + .sceStub.text : { KEEP(*(.sceStub.text)) KEEP(*(SORT(.sceStub.text.*))) } PROVIDE (__etext = .); PROVIDE (_etext = .); PROVIDE (etext = .);