[Rpm-maint] [PATCH] find-debuginfo.sh: Also pass -g to eu-strip for executables.

Mark Wielaard mjw at redhat.com
Thu Mar 26 11:23:10 UTC 2015


On Thu, 2015-03-19 at 14:15 +0100, Mark Wielaard wrote:
> The -g flag was only passed to eu-strip for shared libraries.
> Explicitly pass it also for executables. This also makes it more
> consistent since PIE executables were reported by file -bi as
> application/x-sharedlib.

Ping.

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

Note that bug also contains a fix for mini symtab support, which doesn't
seem to have been upstreamed, but is a fedora extension. See
https://bugzilla.redhat.com/show_bug.cgi?id=1186563#c36

> ---
>  scripts/find-debuginfo.sh | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
> index 264fad5..17522e0 100644
> --- a/scripts/find-debuginfo.sh
> +++ b/scripts/find-debuginfo.sh
> @@ -7,7 +7,7 @@
>  #			   [[-l filelist]... [-p 'pattern'] -o debuginfo.list]
>  #			   [builddir]
>  #
> -# The -g flag says to use strip -g instead of full strip on DSOs.
> +# The -g flag says to use strip -g instead of full strip on DSOs or EXEs.
>  # The --strict-build-id flag says to exit with failure status if
>  # any ELF binary processed fails to contain a build-id note.
>  # The -r flag says to use eu-strip --reloc-debug-sections.
> @@ -23,7 +23,7 @@
>  # All file names in switches are relative to builddir (. if not given).
>  #
>  
> -# With -g arg, pass it to strip on libraries.
> +# With -g arg, pass it to strip on libraries or executables.
>  strip_g=false
>  
>  # with -r arg, pass --reloc-debug-sections to eu-strip.
> @@ -100,6 +100,7 @@ strip_to_debug()
>    $strip_r && r=--reloc-debug-sections
>    $strip_g && case "$(file -bi "$2")" in
>    application/x-sharedlib*) g=-g ;;
> +  application/x-executable*) g=-g ;;
>    esac
>    eu-strip --remove-comment $r $g -f "$1" "$2" || exit
>    chmod 444 "$1" || exit



More information about the Rpm-maint mailing list