From: David Laight <David.Laight@ACULAB.COM>
To: 'Arnout Vandecappelle' <arnout@mind.be>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
"yann.morin@orange.com" <yann.morin@orange.com>
Cc: "buildroot@buildroot.org" <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH] support/scripts/check-host-libs: add new check on host binaries/libs
Date: Wed, 21 Sep 2022 08:23:54 +0000 [thread overview]
Message-ID: <9ce68f90a18642ad96e8010fd87dd15f@AcuMS.aculab.com> (raw)
In-Reply-To: <2ec945e7-22ab-36c9-9ccf-ef022bcfb0ef@mind.be>
From: Arnout Vandecappelle
> Sent: 20 September 2022 20:49
...
> date +%s
> find host/*bin host/lib* -type f |while read f; do
> if printf '\x7f\x45\x4c\x46' | cmp -s -n 4 - ${f}; then
> printf '%s\n' "${f}"
> fi
> done | wc -l
> date +%s
>
> 1663702312
> 111
> 1663702338
Think a bit further and you can remove the exec of cmp, eg:
$ time find /usr/lib -type f | (ELF="$(printf '\x7f\x45\x4c\x46')"; while read f; do read l <"$f" && [ "${l#$ELF}" != "$l" ] && echo $f; done )| wc -l
That takes a few seconds on my system.
I gave up waiting for the one that runs 'cmp' to finish.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-09-21 8:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-20 6:45 [Buildroot] [PATCH] support/scripts/check-host-libs: add new check on host binaries/libs Thomas Petazzoni
2022-09-20 7:46 ` yann.morin
2022-09-20 8:35 ` Thomas Petazzoni
2022-09-20 9:11 ` yann.morin
2022-09-20 9:19 ` Thomas Petazzoni via buildroot
2022-09-20 9:40 ` yann.morin
2022-09-20 9:54 ` Thomas Petazzoni
2022-09-20 19:48 ` Arnout Vandecappelle
2022-09-21 7:26 ` yann.morin
2022-09-21 8:23 ` David Laight [this message]
2022-09-21 8:41 ` yann.morin
2022-09-21 9:05 ` Thomas Petazzoni via buildroot
2022-09-21 9:09 ` yann.morin
2022-09-21 9:24 ` David Laight
2023-04-16 20:10 ` Yann E. MORIN
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9ce68f90a18642ad96e8010fd87dd15f@AcuMS.aculab.com \
--to=david.laight@aculab.com \
--cc=arnout@mind.be \
--cc=buildroot@buildroot.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=yann.morin@orange.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox