Skip to content

Instantly share code, notes, and snippets.

@etam
Created April 25, 2016 08:20
Show Gist options
  • Select an option

  • Save etam/f11ad933c4e17accee649ac5e1c900f4 to your computer and use it in GitHub Desktop.

Select an option

Save etam/f11ad933c4e17accee649ac5e1c900f4 to your computer and use it in GitHub Desktop.
#!/bin/bash
while (( $# > 0 )); do
objcopy --only-keep-debug "$1" "${1}.debug"
strip -g "$1"
objcopy --add-gnu-debuglink="${1}.debug" "$1"
shift
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment