summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2017-09-26 07:26:02 +0000
committerTimo Teräs <timo.teras@iki.fi>2017-09-26 07:27:49 +0000
commit4736a56c8e6ffee2f9101ab8d2b814eb239f5889 (patch)
tree224e5f7609326a784e0428fc9b86deb110c6b5de /abuild.in
parent56b8d45079f3a3f1555e0df8a5bbc481b3583b7c (diff)
downloadabuild-4736a56c8e6ffee2f9101ab8d2b814eb239f5889.tar.gz
abuild-4736a56c8e6ffee2f9101ab8d2b814eb239f5889.tar.bz2
abuild-4736a56c8e6ffee2f9101ab8d2b814eb239f5889.tar.xz
abuild-4736a56c8e6ffee2f9101ab8d2b814eb239f5889.zip
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.
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/abuild.in b/abuild.in
index dae99b3..ef80891 100644
--- a/abuild.in
+++ b/abuild.in
@@ -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