diff --git a/src/stub/Makefile b/src/stub/Makefile index 573848cd..650a9851 100644 --- a/src/stub/Makefile +++ b/src/stub/Makefile @@ -76,7 +76,7 @@ BRANDELF = perl -w $(srcdir)/scripts/brandelf.pl O2BIN = perl -w $(srcdir)/scripts/o2bin.pl SETFOLD = /bin/sh $(srcdir)/scripts/setfold.sh ##STRIPELF = perl -w $(srcdir)/scripts/stripelf.pl -STRIPELF = $(srcdir)/util/sstrip/sstrip +STRIPELF = ./util/sstrip/sstrip # Use gcc 2.95.2 for smallest code. CC_LINUX_CFLAGS = -Wall -W -Wcast-align -Wcast-qual -Wwrite-strings diff --git a/src/stub/scripts/setfold.sh b/src/stub/scripts/setfold.sh index 133942d0..af89a7c3 100644 --- a/src/stub/scripts/setfold.sh +++ b/src/stub/scripts/setfold.sh @@ -36,7 +36,8 @@ file="$1" bindir=`echo "$0" | sed -e 's|[^/][^/]*$||'` bindir=`cd "$bindir" && pwd` -sstrip="$bindir/../util/sstrip/sstrip" +sstrip="./util/sstrip/sstrip" +test -x "$sstrip" || sstrip="$bindir/../util/sstrip/sstrip" # get address of symbol "fold_begin" fold=`nm -f bsd "$file" | grep fold_begin | sed 's/^0*\([0-9a-fA-F]*\).*/0x\1/'` diff --git a/src/stub/util/sstrip/Makefile b/src/stub/util/sstrip/Makefile index 360ba877..ef37f5d6 100644 --- a/src/stub/util/sstrip/Makefile +++ b/src/stub/util/sstrip/Makefile @@ -1,7 +1,7 @@ # Makefile for sstrip sstrip: sstrip.c - gcc -O2 -g -Wall -W -o sstrip sstrip.c + gcc -O2 -g -Wall -W -o sstrip $< clean: rm -f sstrip