Help me please !!
Alexandre Oliva
aoliva@redhat.com
Thu Apr 19 12:24:00 GMT 2001
On Apr 19, 2001, pkurpis@keck.hawaii.edu (Peter Kurpis) wrote:
> Does anyone know whether the linker-loader
> attaches an entire library to the executable,
> or extracts just the required modules?
The latter. If you have a recent-enough linker, and the library was
compiled with -ffunction-sections, linking with --gc-sections may help
reduce the size of the program by stripping out unused functions even
when they're part of the same module. I'm not really sure
--gc-sections is already fully functional in GNU ld (I've heard of
problems with it in the recent past), but it might be worth a try. If
the library was built with -ffunction-sections, of course.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me
More information about the Gcc-help
mailing list