]>
git.ipfire.org Git - people/arne_f/ipfire-3.x.git/blob - pkgs/build-essentials/buildsystem-tools/stripper
3 # Based on RedHat's brp-strip*.
7 for f
in `find ${BUILDROOT} -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
8 grep -v "^${BUILDROOT}/\?usr/lib/debug" | \
9 grep -v ' shared object,' | \
10 sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do
16 if objdump
-h $f |
grep '^[ ]*[0-9]*[ ]*.note[ ]' -A 1 | \
17 grep ALLOC
>/dev
/null
; then
20 strip
-R .comment
$note "$f" ||
:
23 # Strip ELF shared objects
24 # Please note we don't restrict our search to executable files because
25 # our libraries are not (should not be, at least) +x.
26 for f
in `find ${BUILDROOT} -type f -a -exec file {} \; | \
27 grep -v "^${BUILDROOT}/\?usr/lib/debug" | \
28 grep ' shared object,' | \
29 sed -n -e 's/^\(.*\):[ ]*ELF.*, not stripped/\1/p'`; do
30 strip
--strip-unneeded "$f"