busybox --gc-sections thing

Jason Schoon floydpink at gmail.com
Sun Dec 10 14:58:04 UTC 2006


On 12/10/06, Yann E. MORIN <yann.morin.1998 at anciens.enib.fr> wrote:
>
> Denis, all,
>
> On Sunday 10 December 2006 040, Denis Vlasenko wrote:
> > Static glibc cannot do name resolution. Forget "ping <hostname>" -
> > it won't work. (Didn't check recently - maybe fixed now).
>
> Yes it does. *But* you have to have at least one of those:
>    libnss_{compat,dns,files,hesiod,nis{,plus}}*.so
>
> And, yes, those are shared libraries, and you need them to be present even
> if
> your binary was statically linked. NSS stands for Name Service Switch, and
> is
> configured via /etc/nsswitch.conf.
>
> And those libraries are linked against libc.so and ld-linux.so, then
> you'll
> have to have the shared C library and the dynamic loader as well!
>
> Thus, compiling static binaries, which require name services (eg. DNS),
> with
> glibc anyway sucks in libc.so and at least one of the libnss libraries...
>
> So, stay away from static linking with glibc. Use uClibc.
>
> Regards,
> Yann E. MORIN.


Well said.  There really isn't much of a reason to statically link with
glibc.  If you do, you can live with seeing Busybox spit out some warnings.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20061210/b161679d/attachment.htm 


More information about the busybox mailing list