This is the mail archive of the
mailing list for the Cygwin project.
Re: minires-0.95 - a new package ready for review
Corinna Vinschen wrote:
> On Wed, Nov 19, 2003 at 01:23:05PM -0500, Pierre A. Humblet wrote:
> > Does linux use a recent bind adding underscores (grep res_query resolv.h)?
> > Does OpenSSH's configure behave OK there? If so, why?
> Apparently, on Linux the shared lib libresolve.so defines not only a
> text symbol __res_query, it also defines something called a weak
> symbol named res_query:
> $ nm libresolv.so | grep res_query
> 00006640 T __res_query
> 00006880 T __res_querydomain
> 00006640 W res_query
> 00006880 W res_querydomain
> While minres doesn't do the same:
> $ nm /usr/lib/libresolv.dll.a | grep res_query
> 00000000 T ___res_querydomain
> 00000000 I __imp____res_querydomain
> 00000000 T ___res_query
> 00000000 I __imp____res_query
> Does ld on Cygwin support weak symbols? Or is it possible to
> define __imp__res_query additionally to __imp____res_query?
Very interesting, thanks.
Apparently ld can do it, either with a DEF file (yuck, dll only?)
or from the source. However in the second case I am afraid the
#define will hurt us. I will experiment this evening.
I had thought about adding a symbol.
One solution to define the additional symbol is to use something
like the newsym script in cygwin.
Btw, could cygwin use weak symbols instead of newsym?