LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   strip command (http://www.linuxquestions.org/questions/programming-9/strip-command-581841/)

varun_shrivastava 09-03-2007 07:46 AM

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

gnashley 09-03-2007 08:18 AM

Try using 'strip --strip-unneeded' or 'strip --strip-debug'.

varun_shrivastava 09-03-2007 08:31 AM

Quote:

Originally Posted by gnashley (Post 2879661)
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

gnashley 09-03-2007 11:04 AM

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.


All times are GMT -5. The time now is 05:06 AM.