This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Building statically linked application
- From: loody <miloody at gmail dot com>
- To: Andre-Marcel Hellmund <andre-marcel dot hellmund at hp dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 18 May 2009 02:18:06 +0800
- Subject: Re: Building statically linked application
- References: <4A10399B.3090606@hp.com>
hi:
2009/5/18 Andre-Marcel Hellmund <andre-marcel.hellmund@hp.com>:
> 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
if you don't mind, would you please show me the conetne of your test.c?
thanks a lot,
miloody