Re: [i386] Why g++ _always_ link an executable with libm.so?

Mike Hearn <[email protected]>
Newsgroups gmane.comp.gcc.devel,gmane.linux.gcc
Message-ID <1104952228.3083.10.camel@littlegreen>
On Wed, 2005-01-05 at 13:48 -0500, Andrew Pinski wrote:
> Again why are you complaining when a good dynamic loader will not load
> the needed libraries unless they are really needed?

You can't do that for ELF, you have no idea what libraries symbols are
meant to come from. The NEEDED entries in a binary are how the loader
knows what's needed and what's not, as the name implies. There's no way
to strip these entries once the binary has been built (except taking
them away one at a time and seeing if anything breaks ...) so it's
better if the compiler/linker does it.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.