how to get "the big picture" with nm, objdump, size for object size?

Nick Clifton nickc@redhat.com
Mon Sep 27 11:14:00 GMT 2010


Hi Ilya,

> 1. Static libraries vs shared libraries.

> I think that using shared libraries will *greatly* reduce link times,
> am I right?

They should reduce your link times, but I am not sure that the reduction 
will be as great as you think.  The shared libraries still need to be 
examined by the linker, so there is still going to be some overhead from 
using them.

> 2. As you can see, debug sections occupy very much space (for
> executables they hold even more, ~86%). It is too slow to transfer it
> from object files to libraries, then to executables. What about to keep
> debug data in a database?

Have a read of the documentation for the objcopy program, especially its 
--strip-debug and --only-keep-debug options.  These options do most of 
what you want, except for speeding up link times by removing the debug 
info before the link.  Removing the debug info at the object file stage 
is a bad idea since the information is incomplete and still needs 
processing in order to make sure that it corresponds to the final 
executable.

Cheers
   Nick






More information about the Binutils mailing list