[Rpm-maint] [PATCH] find-debuginfo.sh: Handle application/x-pie-executable (file 5.33 output).

Mark Wielaard mark at klomp.org
Tue May 22 20:20:19 UTC 2018


A new version of file (5.33) changed the output for PIE executables.
Which are now represented as application/x-pie-executable; charset=binary.

The following change simply recognizes that binary format as one for
which -g applies. This fixes accidental stripping of the .symtab in
glibc (which use -g to keep that symbol table).

https://bugzilla.redhat.com/show_bug.cgi?id=1581224

Signed-off-by: Mark Wielaard <mark at klomp.org>
---
 scripts/find-debuginfo.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index a7c2db0..90a4494 100755
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -235,6 +235,7 @@ strip_to_debug()
   $strip_g && case "$(file -bi "$2")" in
   application/x-sharedlib*) g=-g ;;
   application/x-executable*) g=-g ;;
+  application/x-pie-executable*) g=-g ;;
   esac
   eu-strip --remove-comment $r $g ${keep_remove_args} -f "$1" "$2" || exit
   chmod 444 "$1" || exit
-- 
1.8.3.1



More information about the Rpm-maint mailing list