#!/bin/sh
#This script is taken from the DEBIAN GNU/Linux system
set -e

# _dl_debug_state is a symbol of ld-linux.so that is used by GDB to breakpoint
# debug dynamicaly-loaded code. I explicitly keep it here. There will no doubt
# be other symbols like this. Saving 10 or 20 of them is probably cheap enough
# that you'd never notice the space.

case "$1" in
  \*ld*)
    ;;
  *)
    echo "stripping $1"
    strip --remove-section=.note --remove-section=.comment --keep-symbol _dl_debug_state $1
    ;;
esac
