This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin 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: minires-0.95 - a new package ready for review


vinschen@redhat.com 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)?


Yes.


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?

No, the current pe bfd doesn't support the weak attribute. I believe only elf targets support it at this time (maybe some aout as well?). However, the kludge I use to get around this is to just do this in the source file:


#define foo __foo
int
__foo {
....
}

Or you can use a typedef if your symbol is a struct or similar.

Cheers,
Nicholas


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