SVN: geninitrd/trunk/geninitrd

arekm arekm at pld-linux.org
Tue Nov 8 22:04:29 CET 2011


Author: arekm
Date: Tue Nov  8 22:04:28 2011
New Revision: 12409

Modified:
   geninitrd/trunk/geninitrd
Log:
Strip modules by default.

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Tue Nov  8 22:04:28 2011
@@ -18,6 +18,7 @@
 # list of geninitrd modules which need setup routine after commandline args parsing
 GENINITRD_MODS=""
 COMPRESS=yes
+STRIP=yes
 target=""
 kernel=""
 force=""
@@ -47,6 +48,7 @@
 	echo "Usage: $PROGRAM [--version] [-v] [-f] [--ifneeded] [--preload <module>]"
 	echo "       [--with=<module>] [--image-version] [--fstab=<fstab>] [--nocompress]"
 	echo "       [--compress=yes|xz|lzma|bzip2|gzip|lzo]"
+	echo "       [--nostrip ]"
 	echo "       [--initrdfs=rom|initramfs|ext2|cram] [--modules-conf=<modules.conf>]"
 	echo "       [--with-bootsplash] [--without-bootsplash]"
 	echo "       [--with-fbsplash] [--without-fbsplash]"
@@ -630,6 +632,9 @@
 		inst_d "/lib/modules/$kernel/$MODULEDIR"
 		cp -a "/lib/modules/$kernel/$mod" "$DESTDIR/lib/modules/$kernel/$mod"
 		gunzip "$DESTDIR/lib/modules/$kernel/$mod" 2> /dev/null
+		if [ -x /usr/bin/strip ] && is_yes "$STRIP"; then
+			/usr/bin/strip --strip-unneeded --remove-section=.comment --remove-section=.note.GNU-stack "$DESTDIR/lib/modules/$kernel/$mod"
+		fi
 	done
 }
 
@@ -1017,6 +1022,9 @@
 	--nocompress)
 		COMPRESS=no
 		;;
+	--nostrip)
+		STRIP=no
+		;;
 	--ifneeded)
 		ifneeded=1
 		;;


More information about the pld-cvs-commit mailing list