This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building statically linked application


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]