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

Mark Wielaard mark at klomp.org
Wed May 30 08:58:02 UTC 2018


On Tue, 2018-05-22 at 22:20 +0200, Mark Wielaard wrote:
> 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

Ping. Fedora has since backed out the upstream change to file which
caused this. But the patch is still useful/necessary when using a
newer/upstream file.

> 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


More information about the Rpm-maint mailing list