-   Programming (
-   -   strip command (

varun_shrivastava 09-03-2007 08:46 AM

strip command

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.


gnashley 09-03-2007 09:18 AM

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

varun_shrivastava 09-03-2007 09:31 AM


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 12:04 PM

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 11:04 PM.