Commit 4736a56c authored by Timo Teräs's avatar Timo Teräs

abuild: do not try to strip standalone elf images

Guile uses ELF is internal object format, and creates them as
"no machine" and "standlone" OSABI. Scanelf supports printing
OSABI, so use that to filter these out.
See: https://github.com/alpinelinux/aports/pull/1714

This also removes unneccessary 'sed' from the pipeline as it's
simple to read each field outputted by scanelf.
parent 56b8d450
......@@ -2142,9 +2142,9 @@ stripbin() {
esac
msg "Stripping binaries"
scanelf --recursive --nobanner --etype "ET_DYN,ET_EXEC" . \
| sed -e 's:^ET_DYN ::' -e 's:^ET_EXEC ::' \
| while read filename; do
scanelf --recursive --nobanner --osabi --etype "ET_DYN,ET_EXEC" . \
| while read type osabi filename; do
[ "$osabi" != "STANDALONE" ] || continue
local XATTR=$(getfattr --match="" --dump "${filename}")
"${stripcmd}" "${filename}"
if [ -n "$XATTR" ]; then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment