Mail Archives: cygwin-developers/2002/01/16/05:33:54
Ok, its the time of year where I produce an idea, and get laughed
down...
I'd like to split the cygwin1.dll into a _real_ libc, libm, and possible
libpthread.
When? As time permits.
Why? Simplicity, efficiency.
Who? Whoever has time - I'll do some of it, but not at a rush!
I don't want to start working on something that has 0 chance of being
accepted, which is why the email and not a patch.
Cygwin1.dll does many things: It provides a C runtime library, it
provides 'kernel-space' calls (ie memory mapping is a kernel call)...
As I understand it, most of the C library is implemented in newlib, with
'kernel' calls sitting in cygwin. I.e. writeln() is in newlib, and uses
write(), which is also in newlib, but uses _write() (or something
similar) in cygwin to do the actual writing.
So my proposal is (over the long term, complete only after the next ABI
breakage (sidenote - should we have a list of things, like uid_t to
change when that occurs)):
1) Create a .dll, cygc-0.dll that contains the actual newlib libc code,
and links against cygwin1.dll.
2) Likewise for cygm-0.dll, and possibly cygpthread-0.dll.
3*) Where cygwin itself does not use a function, remove it from cygwin,
and turn it into a forwarded export from cygc-0.dll etc.
4) ? Do we want this step ? Get newlib building cygc-0.dll and
cygm-0.dll directly.
* = (backward compatability only, remove at the next ABI breakage)
There are a couple of reasons to do this.
a) A smaller .dll will load faster (and if done correctly, when an app
doesn't use libm, then libm won't load, likewise for pthread).
b) This will give greater clarity to what 'kernel' code, and whats
'user' code.
c) Static versions of the new libraries will be possible - by definition
they will not directly rely on the shared memory area. (But they'll
still need to link to cygwin1.dll, thus preventing anyone using cygwin
statically :] ).
d) Potentially, libc updates and libm updates can be disjointed from
cygwin1.dll updates.
Thoughts? Ridicule etc, all appreciated :}.
Rob
- Raw text -