From 9fe21a69993e3d775b5bb449bd3ab632aa70b2cc Mon Sep 17 00:00:00 2001 From: Daniel Gibbs Date: Sun, 30 Apr 2017 16:41:41 +0100 Subject: [PATCH] detect glibc now shows the the files that require glibc and the version --- lgsm/functions/command_dev_detect_glibc.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lgsm/functions/command_dev_detect_glibc.sh b/lgsm/functions/command_dev_detect_glibc.sh index 08b178117..4a28ed805 100644 --- a/lgsm/functions/command_dev_detect_glibc.sh +++ b/lgsm/functions/command_dev_detect_glibc.sh @@ -27,12 +27,19 @@ echo "" files=$(find ${filesdir} | wc -l) find "${filesdir}" -type f -print0 | while IFS= read -r -d $'\0' line; do + glibcversion=$(objdump -T "${line}" 2>/dev/null|grep -oP "GLIBC[^ ]+" |grep -v GLIBCXX|sort|uniq|sort -r --version-sort| head -n 1) + if [ "${glibcversion}" ];then + echo "${glibcversion}: ${line}" >>"${tmpdir}/detect_glibc_files.tmp" + fi objdump -T "${line}" 2>/dev/null|grep -oP "GLIBC[^ ]+" >>"${tmpdir}/detect_glibc.tmp" echo -n "${i} / ${files}" $'\r' ((i++)) done echo "" +cat "${tmpdir}/detect_glibc_files.tmp" +echo "" cat "${tmpdir}/detect_glibc.tmp"|sort|uniq|sort -r --version-sort rm "${tmpdir}/detect_glibc.tmp" +rm "${tmpdir}/detect_glibc_files.tmp" core_exit.sh