Fix inverted logic for objcopy vs. llvm-objcopy with --keep-symbols

Bug: 113936524
Test: m checkbuild
Change-Id: I958c4277342ed6885714a01bd9f35183ed73eda7
This commit is contained in:
Colin Cross
2018-09-07 17:35:56 -07:00
parent 2f7e3bb4d0
commit 0abcbe6a6d

View File

@@ -63,9 +63,9 @@ do_strip_keep_symbols() {
# we have not found a use case that is broken by objcopy yet.
REMOVE_SECTIONS=`"${CROSS_COMPILE}readelf" -S "${infile}" | awk '/.debug_/ {print "--remove-section " $2}' | xargs`
if [ ! -z "${use_llvm_strip}" ]; then
"${CROSS_COMPILE}objcopy" "${infile}" "${outfile}.tmp" ${REMOVE_SECTIONS}
else
"${CLANG_BIN}/llvm-objcopy" "${infile}" "${outfile}.tmp" ${REMOVE_SECTIONS}
else
"${CROSS_COMPILE}objcopy" "${infile}" "${outfile}.tmp" ${REMOVE_SECTIONS}
fi
}