From fc3c4a93a6e665927ec495cc52130fbb87e35c7c Mon Sep 17 00:00:00 2001 From: Slava Barinov Date: Thu, 7 May 2020 11:45:28 +0300 Subject: scripts: Fix eu-strip for files with 'debug' in pathname find-debuginfo.sh erroneously detected files with 'debug' in name as files which do have debuginfo sections. Change-Id: Ie18714130f2ee315cdabf56e521eb6f63cb98e8b Signed-off-by: Slava Barinov --- scripts/find-debuginfo.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh index f2cc8b8f8..c5bb4196f 100755 --- a/scripts/find-debuginfo.sh +++ b/scripts/find-debuginfo.sh @@ -281,7 +281,7 @@ $strict || strict_error=WARNING find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm /111 -or -name "*.so*" -or -name "*.ko" \) ! -name "*.a" -print0 | sort -z | xargs --no-run-if-empty -0 stat -c '%h %D_%i %n' | while read nlinks inum f; do - case $(objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in + case $(objdump -h $f 2>/dev/null | sed -n '/^Sections:/,$p' | egrep -o '(debug[\.a-z_]*|gnu.version)') in *debuglink*) continue ;; *debug*) ;; *gnu.version*) -- cgit v1.2.3