Create libgcc_stripped with llvm-objcopy
llvm-objcopy now implements '--regex' option, which allows it to replace GNU objcopy for creating libgcc_stripped archieve. Test: build Bug: 131631155 Change-Id: Ie1733ac8e9b3765f7652a562406dcedb4735cc1a
This commit is contained in:
@@ -602,7 +602,6 @@ toolchain_library {
|
|||||||
"__gnu_unwind_execute",
|
"__gnu_unwind_execute",
|
||||||
"__gnu_unwind_frame",
|
"__gnu_unwind_frame",
|
||||||
],
|
],
|
||||||
use_gnu_strip: true,
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
arm64: {
|
arm64: {
|
||||||
@@ -650,7 +649,6 @@ toolchain_library {
|
|||||||
"__register_frame_info_table_bases",
|
"__register_frame_info_table_bases",
|
||||||
"__register_frame_table",
|
"__register_frame_table",
|
||||||
],
|
],
|
||||||
use_gnu_strip: true,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -84,17 +84,17 @@ do_strip_keep_symbols() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
do_strip_keep_symbol_list() {
|
do_strip_keep_symbol_list() {
|
||||||
if [ -z "${use_gnu_strip}" ]; then
|
|
||||||
echo "do_strip_keep_symbol_list does not work with llvm-objcopy"
|
|
||||||
echo "http://b/131631155"
|
|
||||||
usage
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "${symbols_to_keep}" | tr ',' '\n' > "${outfile}.symbolList"
|
echo "${symbols_to_keep}" | tr ',' '\n' > "${outfile}.symbolList"
|
||||||
KEEP_SYMBOLS="-w --strip-unneeded-symbol=* --keep-symbols="
|
|
||||||
KEEP_SYMBOLS+="${outfile}.symbolList"
|
|
||||||
|
|
||||||
"${CROSS_COMPILE}objcopy" "${infile}" "${outfile}.tmp" ${KEEP_SYMBOLS}
|
if [ -z "${use_gnu_strip}" ]; then
|
||||||
|
KEEP_SYMBOLS="--strip-unneeded-symbol=.* --keep-symbols="
|
||||||
|
KEEP_SYMBOLS+="${outfile}.symbolList"
|
||||||
|
"${CLANG_BIN}/llvm-objcopy" --regex "${infile}" "${outfile}.tmp" ${KEEP_SYMBOLS}
|
||||||
|
else
|
||||||
|
KEEP_SYMBOLS="--strip-unneeded-symbol=* --keep-symbols="
|
||||||
|
KEEP_SYMBOLS+="${outfile}.symbolList"
|
||||||
|
"${CROSS_COMPILE}objcopy" -w "${infile}" "${outfile}.tmp" ${KEEP_SYMBOLS}
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
do_strip_keep_mini_debug_info() {
|
do_strip_keep_mini_debug_info() {
|
||||||
|
Reference in New Issue
Block a user