Signed-off-by: Stefan Schantl stefan.schantl@ipfire.org --- src/scripts/extract-debuginfo.in | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/scripts/extract-debuginfo.in b/src/scripts/extract-debuginfo.in index c258ed1..c43cae4 100644 --- a/src/scripts/extract-debuginfo.in +++ b/src/scripts/extract-debuginfo.in @@ -2,6 +2,7 @@ # extract-debuginfo.sh - automagically generate debug info # # Usage: extract-debuginfo.sh [--strict-build-id] [-g] [-r] +# [--keep-section SECTION] [--remove-section SECTION] # [builddir] # # The -g flag says to use strip -g instead of full strip on DSOs. @@ -25,6 +26,9 @@ strip_r=false # Barf on missing build IDs. strict=false
+# keep or remove arguments to eu-strip. +keep_remove_args= + BUILDDIR=. while [ $# -gt 0 ]; do case "${1}" in @@ -43,6 +47,14 @@ while [ $# -gt 0 ]; do -r) strip_r=true ;; + --keep-section) + keep_remove_args="${keep_remove_args} --keep-section $2" + shift + ;; + --remove-section) + keep_remove_args="${keep_remove_args} --remove-section $2" + shift + ;; *) BUILDDIR=${1} shift @@ -68,7 +80,7 @@ strip_to_debug() { ;; esac
- eu-strip --remove-comment ${r} ${g} -f "${1}" "${2}" || exit + eu-strip --remove-comment ${r} ${g} ${keep_remove_args} -f "${1}" "${2}" || exit chmod 444 "${1}" || exit }