Strip does not strip any functions out of your binary.
Strip takes out debugging symbols and stuff - which aren't required to run the program anyway.
I don't know whether, or under what conditions ld does unused function elimination - but not always.
Maybe it depends whether they're compiled with pic or not - but in any case, ld won't necessarily do so.
But it won't link in any objects which aren't required.
Mark
Unused function detection
If you want to do it automatically, you could scan your header files for function declarations, and compile these into a temp file. Then you go through the file line by line grepping for instances of that function, and compile a report of the number and location of any instances. Last, you would warn about functions that only show up once (or less) ie only the implementation, or lack thereof.
At least, it's a start!
[Edited by - erissian on February 16, 2006 7:20:28 PM]
At least, it's a start!
[Edited by - erissian on February 16, 2006 7:20:28 PM]
We''re sorry, but you don''t have the clearance to read this post. Please exit your browser at this time. (Code 23)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement