1 #!/bin/sh 2 set -e 3 if [ $# -ne 3 ]; 4 then echo "usage: $0 <input> <stripped-binary> <debug-binary>" 5 fi 6 7 @OBJCOPY@ --enable-deterministic-archives -p --only-keep-debug $1 $3 8 @OBJCOPY@ --enable-deterministic-archives -p --strip-debug $1 $2 9 @STRIP@ --enable-deterministic-archives -p -s $2 10 @OBJCOPY@ --enable-deterministic-archives -p --add-gnu-debuglink=$3 $2 11