summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Kashkarov <m.kashkarov@partner.samsung.com>2019-07-30 23:50:49 +0300
committerMikhail Kashkarov <m.kashkarov@partner.samsung.com>2019-08-01 14:02:12 +0300
commitb976b009e225d0f9856d76e6b48250de0d81b6f9 (patch)
tree9a9a9116c3430a5932e257977c3550628fc57966
parentc31483214b77a41d8d07fa496083a8e055b7df91 (diff)
downloadrpm-b976b009e225d0f9856d76e6b48250de0d81b6f9.tar.gz
rpm-b976b009e225d0f9856d76e6b48250de0d81b6f9.tar.bz2
rpm-b976b009e225d0f9856d76e6b48250de0d81b6f9.zip
Fix binutils strip support
1. Debug information was not connected with stripped part without .gnu_debuglink (eu-strip creates this section automatically) 2. chmod 444 was wrongly propagated to the binaries with the same .debug.id when we put stripped output in the initial input. Change-Id: Ie82a46daf8d8aaea0c3f31d97e99fabc6e8bf68f
-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