Opened 24 years ago

Closed 23 years ago

Last modified 23 years ago

#70 closed defect (wontfix)

Better strip command in chapter 9

Reported by: gerard@… Owned by: gerard@…
Priority: normal Milestone:
Component: Book Version: 3.0-pre3
Severity: normal Keywords:
Cc:

Description

find \( ! -fstype proc -o ! -fstype devpts -o ! -fstype devfs \) -perm +6111 -type f -exec /usr/bin/strip -s '{}' ';'

see if this works as expected (ie: should skip /proc /dev/pts or /dev alltogether when devfs is in use)

Attachments (1)

strip.sh (1.6 KB ) - added by gerard@… 23 years ago.
strip script

Download all attachments as: .zip

Change History (15)

comment:1 by gerard@…, 24 years ago

Owner: changed from lfs-book@… to gerard@…
Status: newassigned

comment:2 by gerard@…, 24 years ago

Resolution: later
Status: assignedclosed

Hmpf not working as I want it to, i'm going to concentrate on other things

comment:3 by gerard@…, 23 years ago

Summary: Better strip command in chapter 10Better strip command in chapter 9

comment:4 by gerard@…, 23 years ago

Resolution: later
Status: closedreopened

comment:5 by gerard@…, 23 years ago

another candidate: find / -path /proc -prune -o -type f -exec strip --strip-debug '{}' ';'

comment:6 by gerard@…, 23 years ago

Simplicity: assume that we got our stuff in /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin /lib and /usr/lib

If people use non-standard locations, they can add their dirs themselves:

find /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin /lib /usr/lib -perm +6111 -type f -exec /usr/bin/strip -g '{}' ';'

comment:7 by gerard@…, 23 years ago

Status: reopenedassigned

comment:8 by gerard@…, 23 years ago

Resolution: fixed
Status: assignedclosed

new command: find $LFS/{,usr,usr/local}/{bin,sbin,lib} -type f \

-exec /usr/bin/strip --strip-debug '{}'

comment:9 by gerard@…, 23 years ago

perhaps not _the_ best command, but for now it'll do

comment:10 by gerard@…, 23 years ago

Resolution: fixed
Status: closedreopened

Jeremy whipped up a nice script to strip as much as possible. It'll check if files are static libs and don't strip too much from those, etc. It has to be run outside of chroot if you plan to strip libraries, else you'll destroy the libraries that the 'strip' program uses (libc.so.6 for example).

Inside chroot you could run it and just disable to 'stripage' of library files. Perhaps we can slightly modify this to easily change the strip option to just -g intead of --strip-unneeded when we're inside chroot.

Anyways, script put in bugzilla, have a look, we'll deal with it later

by gerard@…, 23 years ago

Attachment: strip.sh added

strip script

comment:11 by gerard@…, 23 years ago

Resolution: later
Status: reopenedclosed

comment:12 by gerard@…, 23 years ago

Resolution: later
Status: closedreopened

comment:13 by gerard@…, 23 years ago

Resolution: wontfix
Status: reopenedclosed

Never mind that script (hehe does anybody remember what I'm talking about...it's been a while). The current find/strip combinations work good enough, we're not aiming to reclaim every byte by making things more complicated. How it's done now is a good enough of a tradeof.

comment:14 by markh@…, 23 years ago

ok. current command is good enough.

Note: See TracTickets for help on using tickets.