aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2018-09-05 13:28:01 -0700
committerColin Cross <ccross@android.com>2018-09-05 16:30:16 -0700
commitf843290eb84755b96adf8284ec91864b1ffdfec6 (patch)
tree5aee68c3fec29fc251ba44d9a87525625c1b8446 /scripts
parent22f3795dca8a68e0410613ad08188a88f54b5144 (diff)
downloadbuild_soong-f843290eb84755b96adf8284ec91864b1ffdfec6.tar.gz
build_soong-f843290eb84755b96adf8284ec91864b1ffdfec6.tar.bz2
build_soong-f843290eb84755b96adf8284ec91864b1ffdfec6.zip
Fix strip.sh --keep-mini-debug-info
strip.sh --keep-mini-debug-info had extra $$ escaping from when it was copied from make. Bug: 113936524 Test: m checkbuild Change-Id: I47dec958152584ca94c6149b11a06e64be2f22f9
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/strip.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/strip.sh b/scripts/strip.sh
index 432582fc..8f89a925 100755
--- a/scripts/strip.sh
+++ b/scripts/strip.sh
@@ -82,8 +82,8 @@ do_strip_keep_mini_debug_info() {
# For the following use cases, ${CROSS_COMPILE}objcopy does fine with lld linked files,
# except the --add-section flag.
"${CROSS_COMPILE}objcopy" --only-keep-debug "${infile}" "${outfile}.debug"
- "${CROSS_COMPILE}nm" -D "${infile}" --format=posix --defined-only | awk '{ print $$1 }' | sort >"${outfile}.dynsyms"
- "${CROSS_COMPILE}nm" "${infile}" --format=posix --defined-only | awk '{ if ($$2 == "T" || $$2 == "t" || $$2 == "D") print $$1 }' | sort > "${outfile}.funcsyms"
+ "${CROSS_COMPILE}nm" -D "${infile}" --format=posix --defined-only | awk '{ print $1 }' | sort >"${outfile}.dynsyms"
+ "${CROSS_COMPILE}nm" "${infile}" --format=posix --defined-only | awk '{ if ($2 == "T" || $2 == "t" || $2 == "D") print $1 }' | sort > "${outfile}.funcsyms"
comm -13 "${outfile}.dynsyms" "${outfile}.funcsyms" > "${outfile}.keep_symbols"
echo >> "${outfile}.keep_symbols" # Ensure that the keep_symbols file is not empty.
"${CROSS_COMPILE}objcopy" --rename-section .debug_frame=saved_debug_frame "${outfile}.debug" "${outfile}.mini_debuginfo"