Strip symbols

This commit is contained in:
Francisco Javier Trujillo Mata
2025-06-23 12:49:05 +02:00
parent 9f6f4c0c10
commit c7694722b6
2 changed files with 7 additions and 2 deletions

View File

@@ -188,7 +188,9 @@ $(PSP_EBOOT): $(TARGET).elf $(PSP_EBOOT_SFO)
endif
%.prx: %.elf
psp-prxgen $< $@
$(STRIP) --strip-unneeded --keep-section=.rodata.sce* --keep-section=.sceStub.text --keep-section=.lib.ent* --keep-section=.lib.stub* --keep-section=.symtab --keep-section=.strtab --keep-section=.dynsym --keep-section=.dynstr --keep-section=.hash --keep-section=.dynamic --keep-section=.got --keep-section=.plt --keep-section=.rel* $< -o $(TARGET)_stripped.elf
psp-prxgen $(TARGET)_stripped.elf $@
-rm -f $(TARGET)_stripped.elf
%.c: %.exp
psp-build-exports -b $< > $@

View File

@@ -18,6 +18,7 @@ CC = psp-gcc
CXX = psp-g++
AS = psp-gcc
LD = psp-gcc
STRIP = psp-strip
FIXUP = psp-fixup-imports
# Add PSPSDK includes and libraries.
@@ -55,7 +56,9 @@ $(TARGET).elf: $(OBJS)
endif
%.prx: %.elf
psp-prxgen $< $@
$(STRIP) --strip-unneeded --keep-section=.rodata.sce* --keep-section=.sceStub.text --keep-section=.lib.ent* --keep-section=.lib.stub* --keep-section=.symtab --keep-section=.strtab --keep-section=.dynsym --keep-section=.dynstr --keep-section=.hash --keep-section=.dynamic --keep-section=.got --keep-section=.plt --keep-section=.rel* $< -o $(TARGET)_stripped.elf
psp-prxgen $(TARGET)_stripped.elf $@
-rm -f $(TARGET)_stripped.elf
%.c: %.exp
psp-build-exports -b $< > $@