Ignore readelf's return value.

PR:		251110 (with style fixes)
Submitted by:	John Hein
This commit is contained in:
Mathieu Arnold 2020-11-16 10:50:54 +00:00
parent 25b71a0ba7
commit 292183dbc4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=555463

View File

@ -211,7 +211,7 @@ stripped() {
# files with spaces are kept intact.
# Using readelf -h ... /ELF Header:/ will match on all ELF files.
find ${STAGEDIR} -type f ! -name '*.a' ! -name '*.o' \
-exec readelf -S {} + 2>/dev/null | awk '
-exec sh -c 'readelf -S -- /dev/null "$@" || :' -- {} + 2>/dev/null | awk '
/File:/ {sub(/File: /, "", $0); file=$0}
/[[:space:]]\.debug_info[[:space:]]*PROGBITS/ {print file}' |
while read -r f; do