From 05b3505eb83e19d0870936824f79d7a55c99c766 Mon Sep 17 00:00:00 2001 From: Julian Uy Date: Mon, 5 Feb 2024 22:46:06 -0600 Subject: [PATCH] fix: Remove .pdr section when stripping for iopmod This section is for debug information and loadcore will try to relocate it, but it will apply it on the main program segment instead, breaking it --- iop/Rules.make | 2 +- samples/Makefile.iopglobal_sample | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iop/Rules.make b/iop/Rules.make index aa2788bd1e8..26f77687732 100644 --- a/iop/Rules.make +++ b/iop/Rules.make @@ -137,7 +137,7 @@ $(IOP_BIN_ELF): $(IOP_OBJS) $(IOP_LIB_ARCHIVES) $(IOP_ADDITIONAL_DEPS) $(IOP_BIN_STRIPPED_ELF): $(IOP_BIN_ELF) $(DIR_GUARD) - $(IOP_STRIP) --strip-debug -o $@ $< + $(IOP_STRIP) --strip-debug --remove-section=.pdr -o $@ $< $(IOP_BIN): $(IOP_BIN_STRIPPED_ELF) $(PS2SDKSRC)/tools/srxfixup/bin/srxfixup $(DIR_GUARD) diff --git a/samples/Makefile.iopglobal_sample b/samples/Makefile.iopglobal_sample index 79bf7434786..391ef5dd667 100644 --- a/samples/Makefile.iopglobal_sample +++ b/samples/Makefile.iopglobal_sample @@ -125,7 +125,7 @@ $(IOP_BIN_ELF): $(IOP_OBJS) $(IOP_BIN_STRIPPED_ELF): $(IOP_BIN_ELF) $(DIR_GUARD) - $(IOP_STRIP) --strip-debug -o $@ $< + $(IOP_STRIP) --strip-debug --remove-section=.pdr -o $@ $< $(IOP_BIN): $(IOP_BIN_STRIPPED_ELF) $(DIR_GUARD)