Make it compile again by adding a more portable setfold.sh script.
committer: mfx <mfx> 962038500 +0000
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
file="$1"
|
||||
|
||||
# get directory of this script
|
||||
bindir=`echo "$0" | sed -e 's|[^/][^/]*$||'`
|
||||
bindir=`cd "$bindir" && pwd`
|
||||
|
||||
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/'`
|
||||
|
||||
# strip
|
||||
objcopy -S -R .comment -R .note "$file"
|
||||
"$sstrip" "$file"
|
||||
|
||||
# patch address
|
||||
perl -w "$bindir/setfold.pl" "$file" "$fold"
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user