Skip statically linked program during glibc version check (#8280)

This commit is contained in:
reimda 2020-10-16 14:45:15 -06:00 committed by GitHub
parent f7f0c7324b
commit 771f65eb85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -17,7 +17,7 @@ max=$2
#make sure dependencies are installed
have_deps=true
for i in objdump sort uniq sed; do
for i in objdump grep sort uniq sed; do
if ! command -v "$i" > /dev/null; then
echo "$i not in path"
have_deps=false
@ -60,6 +60,11 @@ vercomp () {
return 0
}
if ! objdump -p "$prog" | grep -q NEEDED; then
echo "$prog doesn't have dynamic library dependencies"
exit 0
fi
objdump -T "$prog" | # get the dynamic symbol table
sed -n "s/.* GLIBC_\([0-9.]\+\).*/\1/p" | # find the entries for glibc and grab the version
sort | uniq | # remove duplicates