2009-02-05 21:08:46 +00:00
|
|
|
#!/bin/sh
|
2012-10-30 01:49:05 +00:00
|
|
|
|
2014-05-08 00:58:20 +00:00
|
|
|
# skip this thing. it slow downs the build too much
|
|
|
|
exit 0
|
|
|
|
|
2012-10-30 01:49:05 +00:00
|
|
|
[ -n "${NOSTRIP}" ] && exit 0
|
|
|
|
|
2009-02-05 21:08:46 +00:00
|
|
|
[ -z "$2" ] && exit 0
|
|
|
|
FILE=$1
|
|
|
|
PFX=$2
|
|
|
|
LIST=$1.list
|
|
|
|
|
|
|
|
if [ "${PFX}" = "r_util" ]; then
|
2009-10-12 15:41:52 +00:00
|
|
|
echo "=> No stripping any symbol in libr_util O:)"
|
|
|
|
exit 0
|
2009-02-05 21:08:46 +00:00
|
|
|
PFX="r_"
|
|
|
|
fi
|
|
|
|
|
2009-10-12 15:41:52 +00:00
|
|
|
nm --defined-only -B ${FILE} 2>/dev/null | grep -v ^${PFX}_ | awk '{print $3}' > ${LIST}
|
2009-02-05 21:08:46 +00:00
|
|
|
#if [ -n "`cat /tmp/list`" ]; then
|
2012-08-14 13:44:17 +00:00
|
|
|
echo "STRIP ${FILE}"
|
2009-04-03 11:11:17 +00:00
|
|
|
objcopy --strip-symbols ${LIST} ${FILE} 2>/dev/null
|
2009-04-02 00:07:58 +00:00
|
|
|
#TODO: Uncomment on release
|
|
|
|
#strip -s ${FILE}
|
2009-02-05 21:08:46 +00:00
|
|
|
#fi
|
|
|
|
|
|
|
|
rm -f ${LIST}
|