Bruce Dubbs wrote these words on 01/27/13 12:08 CST:
> From executables, you can do the same but use --strip-unneeded or
> perhaps --strip-all. I'd need to experiment.
Since the beginning, I have always stripped libraries using --strip-debug and
all binaries (including non-library binaries in the lib hierarchies with
--strip-all. I've never had any problems. All of my scripts have mechanisms to
strip right after I've taken a du picture of the package installation.
Below is an exception about "each package". I strip Xorg (much like Chapter 5
and 6 of LFS) in a one-time pass. Here is my procedure for Xorg:
=========================================================================================================
du -scxk / >${LOGFILE_DIR}/du_before_strip_start.log 2>&1
find ${XORG_PREFIX}/bin -type f \
-exec strip --strip-all --preserve-dates {} \;
>${LOGFILE_DIR}/strip-bin.log 2>&1
cat ${LOGFILE_DIR}/strip-bin.log | grep -v "File format not recognized"
find ${XORG_PREFIX}/lib -type f \
-exec strip --strip-debug --preserve-dates {} \;
>${LOGFILE_DIR}/strip-lib.log 2>&1
cat ${LOGFILE_DIR}/strip-lib.log | grep -v "File format not recognized"
du -scxk / >${LOGFILE_DIR}/du_after_strip_end.log 2>&1
cat ${LOGFILE_DIR}/du_before_strip_start.log \
${LOGFILE_DIR}/du_after_strip_end.log
=========================================================================================================
Here is the result of stripping Xorg after the complete installation:
Before:
6671868 /
6671868 total
After:
6314452 /
6314452 total
Stripped approximately 350MB which cuts the entire Xorg installation in half.
Here is my current Xorg:
du -scxk /opt/X11/
372104 /opt/X11/
372104 total
> If you do -s (--strip-all) on a library, I think it can make it unusable.
Even though you can probably use --strip-all on shared libraries, I never have.
Here is something that explains things:
http://www.technovelty.org/linux/stripping-shared-libraries.html
--
Randy
rmlscsi: [bogomips 1003.23] [GNU ld version 2.16.1] [gcc (GCC) 4.0.3]
[GNU C Library stable release version 2.3.6] [Linux 2.6.14.3 i686]
12:48:00 up 52 days, 22:47, 1 user, load average: 0.42, 0.27, 0.15
--
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page