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
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