43ea916
commit 7145bd4d6edd1622585d7b18b8bba9a71cd41e2b
43ea916
Author: Mark Wielaard <mark@klomp.org>
43ea916
Date:   Tue May 22 22:12:11 2018 +0200
43ea916
43ea916
    find-debuginfo.sh: Handle application/x-pie-executable (file 5.33 output).
43ea916
    
43ea916
    A new version of file (5.33) changed the output for PIE executables.
43ea916
    Which are now represented as application/x-pie-executable; charset=binary.
43ea916
    
43ea916
    The following change simply recognizes that binary format as one for
43ea916
    which -g applies. This fixes accidental stripping of the .symtab in
43ea916
    glibc (which use -g to keep that symbol table).
43ea916
    
43ea916
    https://bugzilla.redhat.com/show_bug.cgi?id=1581224
43ea916
    
43ea916
    Signed-off-by: Mark Wielaard <mark@klomp.org>
43ea916
43ea916
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
43ea916
index a7c2db0..90a4494 100755
43ea916
--- a/scripts/find-debuginfo.sh
43ea916
+++ b/scripts/find-debuginfo.sh
43ea916
@@ -235,6 +235,7 @@ strip_to_debug()
43ea916
   $strip_g && case "$(file -bi "$2")" in
43ea916
   application/x-sharedlib*) g=-g ;;
43ea916
   application/x-executable*) g=-g ;;
43ea916
+  application/x-pie-executable*) g=-g ;;
43ea916
   esac
43ea916
   eu-strip --remove-comment $r $g ${keep_remove_args} -f "$1" "$2" || exit
43ea916
   chmod 444 "$1" || exit