Mail Archives: djgpp-workers/2002/12/20/02:08:25
I have a simple prototype which loads libc.dxe; "hello world" is
about 7Kb in size. It doesn't search for the DXE (assumes libc.dxe
in current directory) so production image would be larger.
I had to write mini-versions of _open, _read and _close since our
current versions touch way too many things. There is a hook I
added to crt0 before setting up the frame stuff which calls it.
There are still some variable addressing issues to be resolved;
but I don't see any issues that would stop from finishing it.
Now for the hard question - what do we do with this? It would
certainly make fixing bugs in libc much easier - upgrade libc.dxe
and all images get the fix. It would knock 50-100K off each
image in the distribution. FAQ questions on image size go away;
replaced by FAQ questions on my image doesn't run on a different
machine .... It makes loading other DXEs easier since you can
end up with a registry of entry points and names for run-time
resolution.
But we would need to support both static and dynamic link libraries,
and what about libm, libgcc, libiconv? It's a huge shift in
development and philosophy. It could make libc updates much more
difficult to maintain backward compatibility.
For small memory machines, loading a libc.dxe in each memory space
would add 500K or so overhead to each activation (pageable, but
slower). DXEs can't be UPXed so you lose a bit on disk cache
efficiency (loading 500K vs maybe 50K-compressed of libc in each
image).
So it's an interesting exercise, but I'm not sure it's useful yet ,,,
- Raw text -