aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools/split-debug.sh.in
blob: deda49cc541043d0a05aee05038c69ee1dee51b3 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

if [ $# -ne 3 ];
    then echo "usage: $0 <input> <stripped-binary> <debug-binary>"
fi

@OBJCOPY@ --enable-deterministic-archives -p --only-keep-debug $1 $3
@OBJCOPY@ --enable-deterministic-archives -p --strip-debug $1 $2
@STRIP@ --enable-deterministic-archives -p -s $2
@OBJCOPY@ --enable-deterministic-archives -p --add-gnu-debuglink=$3 $2