This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Building statically linked application
- From: Daniel Jacobowitz <drow at false dot org>
- To: Andre-Marcel Hellmund <andre-marcel dot hellmund at hp dot com>
- Cc: binutils at sourceware dot org, Martin Alexander Neumann <ma dot neumann at tu-bs dot de>
- Date: Sun, 17 May 2009 15:05:15 -0400
- Subject: Re: Building statically linked application
- References: <4A10399B.3090606@hp.com>
This is not actually a binutils issue; you may want to try the
glibc libc-help list.
On Sun, May 17, 2009 at 06:21:47PM +0200, Andre-Marcel Hellmund wrote:
> In function `main':
> test.c:(.text+0x19): warning: Using 'getprotobyname' in statically
> linked applications requires at runtime the shared libraries from the
> glibc version used for linking
>
> Could you please give some (short) background about this warning and why
> this function (and some others as well) still require the shared
> libraries at runtime although linked statically with:
Take a look at /etc/nsswitch.conf. This specifies shared libraries
implementing bits of the resolver, and they have to be dynamically
loaded at runtime. So you use the statically linked ld.so to load the
system libc.so.6 and libnss*.
--
Daniel Jacobowitz
CodeSourcery