aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/strip.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/strip.sh b/scripts/strip.sh
index 8f89a925..d184a974 100755
--- a/scripts/strip.sh
+++ b/scripts/strip.sh
@@ -71,12 +71,13 @@ do_strip_keep_symbols() {
do_strip_keep_mini_debug_info() {
rm -f "${outfile}.dynsyms" "${outfile}.funcsyms" "${outfile}.keep_symbols" "${outfile}.debug" "${outfile}.mini_debuginfo" "${outfile}.mini_debuginfo.xz"
+ local fail=
if [ ! -z "${use_llvm_strip}" ]; then
- "${CLANG_BIN}/llvm-strip" --strip-all -keep=.ARM.attributes -remove-section=.comment "${infile}" "${outfile}.tmp"
+ "${CLANG_BIN}/llvm-strip" --strip-all -keep=.ARM.attributes -remove-section=.comment "${infile}" "${outfile}.tmp" || fail=true
else
- "${CROSS_COMPILE}strip" --strip-all -R .comment "${infile}" -o "${outfile}.tmp"
+ "${CROSS_COMPILE}strip" --strip-all -R .comment "${infile}" -o "${outfile}.tmp" || fail=true
fi
- if [ "$?" == "0" ]; then
+ if [ -z $fail ]; then
# Current prebult llvm-objcopy does not support the following flags:
# --only-keep-debug --rename-section --keep-symbols
# For the following use cases, ${CROSS_COMPILE}objcopy does fine with lld linked files,