This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Building statically linked application
- From: Andre-Marcel Hellmund <andre-marcel dot hellmund at hp dot com>
- To: binutils at sourceware dot org
- Cc: Martin Alexander Neumann <ma dot neumann at tu-bs dot de>
- Date: Sun, 17 May 2009 18:21:47 +0200
- Subject: Building statically linked application
Hey,
when I try to build a statically linked application which uses the
function "gethostbyname", I get the following linker warning:
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:
gcc test.c -static -o test
Thanks for your help,
Andi