LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-26-2004, 10:29 PM   #1
rsamurti
Member
 
Registered: Dec 2003
Location: Mysore
Distribution: Mandrake, Libranet, Slackware
Posts: 101

Rep: Reputation: 15
Why strip binaries?


Hello:

Please pardon me for my ignorance. What is the meaing of stripping of ELF binaries. While creating a Slackware package, why should this be done? Can any body direct me to the correct information?

Thanks for your help.

Anand
 
Old 06-27-2004, 12:18 AM   #2
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Stripping removes debugging symbols and such junk. It makes them smaller, faster, and require less memory. However, if they crash, you can't really figure out why. If you're a developer and need to debug your stuff, you wouldn't want to strip. If you're just a user who wouldn't debug something or even know how, might as well strip.

You can strip libs, too, but this sometimes has more negative effects. Not sure of the details there. A guru can maybe clarify or correct me if I'm altogether mistaken but this is my understanding.
 
Old 06-27-2004, 07:28 AM   #3
rsamurti
Member
 
Registered: Dec 2003
Location: Mysore
Distribution: Mandrake, Libranet, Slackware
Posts: 101

Original Poster
Rep: Reputation: 15
How to strip binaries?

Thanks for the reply. But how to strip binaries?

Anand
 
Old 06-27-2004, 07:51 AM   #4
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 743

Rep: Reputation: 50
Are you using checkinstall? This will strip the binary files for you
the option is in
/etc/checkinstall/checkinstallrc

else read 'man strip'

tobyl
 
Old 06-27-2004, 04:17 PM   #5
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 33
Here's the Slack way of stripping binaries, both executables and libs ("shared object")......................
Code:
  find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
  find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
NOTE: First 'cd' to the top=level directory where you want to strip the files............These are the commands used in Patrick's SlackBuild scripts found in the source trees of the Slack mirrors.................
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
sendmail - strip attachments - is this possible irubin Linux - Software 1 09-22-2004 08:23 AM
strip -s blackzone Linux - Newbie 1 09-01-2004 12:08 AM
strip command? blackzone Linux - General 2 07-09-2004 03:20 AM
strip poker JROCK1980 Linux - Games 7 04-10-2004 12:40 AM
A quick question about strip.. sandy Linux - Newbie 1 10-09-2003 07:32 AM


All times are GMT -5. The time now is 03:40 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration