]>
git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/stripper
15fa308faff70a1f3731ea395e3e01657788a418
6 local cmd
="${STRIP-strip}"
8 case "$(file -bi ${file})" in
9 application
/x-sharedlib
*|application
/x-archive
*)
10 cmd
="${cmd} --strip-debug --remove-section=.comment --remove-section=.note"
13 cmd
="${cmd} --strip-unneeded"
17 echo "Stripping ${file}..."
22 # Strip shared objects.
23 find ${dir} -type f \
( -perm -0100 -or -perm -0010 -or -perm -0001 \
) \
24 |
file -N -f - |
sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p' |
29 # Strip static archives.
30 find ${dir} -name \
*.a
-a -exec file {} \
; \
31 |
grep 'current ar archive' |
sed -n -e 's/^\(.*\):[ ]*current ar archive/\1/p' |