diff options
author | Mark Wielaard <mjw@redhat.com> | 2011-05-25 15:44:42 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2011-05-26 10:30:50 +0300 |
commit | 40a7e19fbe3a7d040e8b13e6d6e9ac567c56cf04 (patch) | |
tree | 21d3d30492e1a5be9db36d7f0484f5cddbd0ba5c | |
parent | e040a126a01edb4950bc8ef6a93e5ca18070c194 (diff) | |
download | rpm-40a7e19fbe3a7d040e8b13e6d6e9ac567c56cf04.tar.gz rpm-40a7e19fbe3a7d040e8b13e6d6e9ac567c56cf04.tar.bz2 rpm-40a7e19fbe3a7d040e8b13e6d6e9ac567c56cf04.zip |
Add -r flag to find-debuginfo.sh to invoke eu-strip --reloc-debug-sections.
- This is a new option to eu-strip that strips out/resolves relocations
between .debug_* elf sections in ET_REL files. This can save a lot of
space for kernel module.
Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
-rw-r--r-- | scripts/find-debuginfo.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh index e050dc1b5..505dbde44 100644 --- a/scripts/find-debuginfo.sh +++ b/scripts/find-debuginfo.sh @@ -2,7 +2,7 @@ #find-debuginfo.sh - automagically generate debug info and file list #for inclusion in an rpm spec file. # -# Usage: find-debuginfo.sh [--strict-build-id] [-g] +# Usage: find-debuginfo.sh [--strict-build-id] [-g] [-r] # [-o debugfiles.list] # [[-l filelist]... [-p 'pattern'] -o debuginfo.list] # [builddir] @@ -10,6 +10,7 @@ # The -g flag says to use strip -g instead of full strip on DSOs. # 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. # # A single -o switch before any -l or -p switches simply renames # the primary output file from debugfiles.list to something else. @@ -25,6 +26,9 @@ # With -g arg, pass it to strip on libraries. strip_g=false +# with -r arg, pass --reloc-debug-sections to eu-strip. +strip_r=false + # Barf on missing build IDs. strict=false @@ -56,6 +60,9 @@ while [ $# -gt 0 ]; do ptns[$nout]=$2 shift ;; + -r) + strip_r=true + ;; *) BUILDDIR=$1 shift @@ -89,10 +96,12 @@ debugdir="${RPM_BUILD_ROOT}/usr/lib/debug" strip_to_debug() { local g= + local r= + $strip_r && r=--reloc-debug-sections $strip_g && case "$(file -bi "$2")" in application/x-sharedlib*) g=-g ;; esac - eu-strip --remove-comment $g -f "$1" "$2" || exit + eu-strip --remove-comment $r $g -f "$1" "$2" || exit chmod 444 "$1" || exit } |