Re: [i386] Why g++ _always_ link an executable with libm.so?
Mike Hearn <[email protected]> Wed, 05 Jan 2005 19:10:28 +0000
| Newsgroups | org.kernel.vger.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.