summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]scripts/find-debuginfo.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index 97e052d94..e4fffe4b5 100644..100755
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -139,8 +139,9 @@ strip_to_debug()
if [ "$STRIP_DEFAULT_PACKAGE" != "binutils" ]; then
eu-strip --remove-comment $g $strip_option -f "$1" "$2" || exit
else
- mv $2 $1
- strip --remove-section=.comment $g $strip_option -o "$2" "$1" || exit
+ cp "$2" "$1"
+ strip --remove-section=.comment $g $strip_option "$2" || exit
+ objcopy --add-gnu-debuglink="$1" "$2" || exit
fi
esac
chmod 444 "$1" || exit