summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-07 14:11:16 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-07 14:11:16 +0000
commit4f9985069351f9e39b3efe04f979614066cdc841 (patch)
tree9f1c421ee8c0c32039d3e692cc7683d317565efd /bin/prepstrip
parentAdd a depgaph.loadResumeCommand() method to handle loading and validation of ... (diff)
downloadportage-multirepo-4f9985069351f9e39b3efe04f979614066cdc841.tar.gz
portage-multirepo-4f9985069351f9e39b3efe04f979614066cdc841.tar.bz2
portage-multirepo-4f9985069351f9e39b3efe04f979614066cdc841.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) (trunk r7189)
svn path=/main/branches/2.1.2/; revision=7190
Diffstat (limited to 'bin/prepstrip')
-rwxr-xr-xbin/prepstrip10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/prepstrip b/bin/prepstrip
index 4e4e7892..539eba2f 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"* ]] \