LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-03-2007, 07:46 AM   #1
varun_shrivastava
Member
 
Registered: Jun 2006
Distribution: Ubuntu 7.04 Feisty
Posts: 79

Rep: Reputation: 15
strip command


hi

i am facing a problem with strip command.
I tried installing gtk library in scratchbox(a cross compilation tool)
now if i run a gtk program it runs fine but if i strip the libgtk library,
the program starts crashing, displaying seg-fault signal received in some library function.

Is there a problem in striping the library, as if i reinstall gtk library again, every thing works fine.

thanks
varun
 
Old 09-03-2007, 08:18 AM   #2
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,755

Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
Try using 'strip --strip-unneeded' or 'strip --strip-debug'.
 
Old 09-03-2007, 08:31 AM   #3
varun_shrivastava
Member
 
Registered: Jun 2006
Distribution: Ubuntu 7.04 Feisty
Posts: 79

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by gnashley View Post
Try using 'strip --strip-unneeded' or 'strip --strip-debug'.
using strip --strip-debug worked. but does running only strip removes something else.
and also i checked the file size
the original file is 11Mb
after stripping it becomes 3.8Mb
and using strip --strip-debug makes it 4.7Mb

thus it means strip removes something more that is actually required by library to function properly
 
Old 09-03-2007, 11:04 AM   #4
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,755

Rep: Reputation: 466Reputation: 466Reputation: 466Reputation: 466Reputation: 466
Read the man page. Using strip alone will remove all symbols. Running strip -debug removes debugging symbols and running with unneeded may remove others as well. You can also strip or not strip certain symbols or categories of symbols. Usually for libraries it is not a good idea to do a full strip as other libraries which link to those libs may need some of the symbols. Executable binaries can usually be fully stripped.
 
  


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
about strip George2 Programming 8 08-29-2006 08:55 AM
id3lib Strip? bendeco13 Programming 0 04-04-2006 02:10 AM
command for "strip out every line that doesn't contain xxxxx" Rotwang Linux - General 6 08-02-2005 03:08 PM
strip -s blackzone Linux - Newbie 1 09-01-2004 12:08 AM
strip command? blackzone Linux - General 2 07-09-2004 03:20 AM


All times are GMT -5. The time now is 04:48 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