view buildsys/scripts/elf-to-psp-eboot.sh @ 256:7520e2260097

- added to configure some detection on how to compile .s/.S with --noexecstack (or similar), as compilers' defaults are often insane - since no-execstack handling is now in build, remove .note.GNU-stack section markers (were of limites use, anyways, b/c unportable or implemented inconsistently across platforms) - some ToDo, etc. updates
author Tassilo Philipp
date Sat, 20 May 2017 00:02:59 +0200
parents 3e629dc19168
children
line wrap: on
line source

#!/bin/sh

if ! [ -x "$1" ]; then
	echo Usage: $0 \<elf\>
	exit 1
fi

TITLE=`basename $1`
SFO=/tmp/${TITLE}.sfo
FIXED_ELF=/tmp/${TITLE}.fixed
STRIPPED_ELF=/tmp/${TITLE}.stripped

mksfo             dyncall_${TITLE} $SFO
psp-fixup-imports -o $FIXED_ELF $1
psp-strip         $FIXED_ELF -o $STRIPPED_ELF
pack-pbp          EBOOT.PBP $SFO NULL NULL NULL NULL NULL $STRIPPED_ELF NULL
rm $SFO
rm $FIXED_ELF
rm $STRIPPED_ELF