Add xdr support

Corinna Vinschen
Mon Feb 15 09:21:00 GMT 2010

On Feb 14 14:12, Christopher Faylor wrote:
> On Sun, Feb 14, 2010 at 05:33:08PM +0000, Dave Korn wrote:
> >On 14/02/2010 10:18, Corinna Vinschen wrote:
> >>I don't know if that works, but it would be really cool if a single DLL
> >>import lib like libcygwin.a could export symbols from different DLLs.
> >>That way we could create a cygxdr1.dll which contains the XDR
> >>functions, but which could be linked against by just the default
> >>linking against libcygwin.a.
> >
> >Why would we do that?
> Yeah, ditto.  It's an interesting idea but I was more thinking that this
> would be something that was added to the command-line specifically, like,
> e.g., a -lxdr .

I was thinking along the lines of having rather not-so-often used
functionality implemented in secondary DLLs, while maintaining the libc
link interface.  In the end this application:

   gcc foo-not-using-xdr.c (-lcygwin)

would be linked against cygwin1.dll and this one:

   gcc foo-using-xdr.c (-lcygwin)

would be linked against cygwin1.dll and cygxdr1.dll.  That only makes
limited sense as long as just XDR is affected, but the end result would
be that you could keep the size of cygwin1.dll smaller and to load
seldom stuff only on demand without any tradeoff at build time.

Well, it was just some random idea.  Don't worry.

> It would be kind of cool if we could keep, say, the pthread library in
> a separate dll but, unfortunately, that boat has already sailed.

Perhaps not.  I'm not saying we should or even can do the same, but with
W7 MSFT has splitted their DLLs into multiple sub-DLLs, as you can
easily see when calling cygcheck.  However, application still link
against the default DLL, for instance kernel32.dll.  It provides shims
to the other DLLs.
So, in theory, we could create a new cygpthread.dll and a cygpthread.a
which links against cygpthread.dll.  cygwin1.dll would only contain the
same functions for backward compatibility, which actually load the same
functions from cygpthread.dll.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

More information about the Cygwin-patches mailing list