summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-07-07 09:38:13 +0000
committerMike Frysinger <vapier@gentoo.org>2007-07-07 09:38:13 +0000
commit65513890829eff5ccbc48f25c26667a90cfc9718 (patch)
tree571b181214eb5b48b77e92d7a7f96ba274966c19 /bin
parent6ba5b332155d201ceeed9039c338221619b11e5a (diff)
downloadportage-65513890829eff5ccbc48f25c26667a90cfc9718.tar.gz
portage-65513890829eff5ccbc48f25c26667a90cfc9718.tar.bz2
portage-65513890829eff5ccbc48f25c26667a90cfc9718.zip
`find` can accept a list of paths so condense this nested for loop, and dont split off debug information for ET_REL files as these are never pulled in via debug utilities (and can trigger weird behavior in binutils when linked into things, like glibcs crt1.o)
svn path=/main/trunk/; revision=7189
Diffstat (limited to 'bin')
-rwxr-xr-xbin/prepstrip10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/prepstrip b/bin/prepstrip
index 4e4e78923..539eba2f1 100755
--- a/bin/prepstrip
+++ b/bin/prepstrip
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 1999-2006 Gentoo Foundation
+# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -51,7 +51,6 @@ save_elf_debug() {
${OBJCOPY} --only-keep-debug "${x}" "${y}"
${OBJCOPY} --add-gnu-debuglink="${y}" "${x}"
chmod a-x,o-w "${y}"
-
}
# The existance of the section .symtab tells us that a binary is stripped.
@@ -66,7 +65,10 @@ if [[ -n "${f}" ]] ; then
fi
# Now we look for unstripped binaries.
-for x in $(scanelf -yqRBF '#k%F' -k '.symtab' "$@") $(for y in "$@"; do find "${y}" -type f -name '*.a' -print ; done); do
+for x in \
+ $(scanelf -yqRBF '#k%F' -k '.symtab' "$@") \
+ $(find "$@" -type f -name '*.a')
+do
if [[ ${banner} -eq 1 ]] ; then
[[ -z ${NOSTRIP} ]] && vecho "strip: ${STRIP} ${PORTAGE_STRIP_FLAGS}"
banner=0
@@ -91,7 +93,7 @@ for x in $(scanelf -yqRBF '#k%F' -k '.symtab' "$@") $(for y in "$@"; do find "${
[[ ${stripitbaby} -eq 1 ]] && ${STRIP} -g "${x}"
elif [[ ${f} == *"SB executable"* || ${f} == *"SB shared object"* || ${f} == *"SB relocatable"* ]] ; then
vecho " ${x:${#D}}"
- save_elf_debug "${x}"
+ [[ ${f} != *"SB relocatable"* ]] && save_elf_debug "${x}"
[[ -n ${NOSTRIP} ]] && continue
if [[ ${stripitbaby} -eq 1 ]] ; then
[[ ${f} == *"SB relocatable"* ]] \