aboutsummaryrefslogtreecommitdiff
path: root/contrib/devtools/split-debug.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/devtools/split-debug.sh.in')
-rw-r--r--contrib/devtools/split-debug.sh.in10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/devtools/split-debug.sh.in b/contrib/devtools/split-debug.sh.in
new file mode 100644
index 0000000000..deda49cc54
--- /dev/null
+++ b/contrib/devtools/split-debug.sh.in
@@ -0,0 +1,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