2022-07-28 23:43:44 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
strip_dir() {
|
|
|
|
for file in `ls $1`
|
|
|
|
do
|
|
|
|
if [ -d $1"/"$file ]; then
|
|
|
|
strip_dir $1"/"$file
|
|
|
|
else
|
|
|
|
if [ -x $1"/"$file ]; then
|
|
|
|
case "$file" in
|
|
|
|
*.a);;
|
|
|
|
*.la);;
|
|
|
|
*)strip $1"/"$file; continue;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
case "$file" in
|
|
|
|
*.a) strip -g -S -d $1"/"$file;;
|
|
|
|
*.so) strip $1"/"$file;;
|
|
|
|
*.so.*) strip $1"/"$file;;
|
|
|
|
*);;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
# strip glibc
|
2022-07-31 01:54:15 +08:00
|
|
|
rm -rf work/glibc_install/usr/share
|
2022-07-28 23:43:44 +08:00
|
|
|
strip_dir work/glibc_install
|
|
|
|
|
|
|
|
# strip busybox
|
2022-07-31 01:54:15 +08:00
|
|
|
rm -rf work/busybox_install/linuxrc
|
2022-07-28 23:43:44 +08:00
|
|
|
strip work/busybox_install/bin/busybox
|
|
|
|
|
|
|
|
# strip gcc
|
2022-07-31 01:54:15 +08:00
|
|
|
#rm -rf work/libgcc_install/usr/share
|
2022-07-28 23:43:44 +08:00
|
|
|
strip_dir work/libgcc_install
|
|
|
|
|
|
|
|
# strip binutils
|
2022-07-31 01:54:15 +08:00
|
|
|
#rm -rf work/binutils_install/usr/share
|
2022-07-28 23:43:44 +08:00
|
|
|
strip_dir work/binutils_install
|
|
|
|
|