Re: dso loading question

Ralf Baechle (ralf@uni-koblenz.de)
Mon, 31 May 1999 09:10:02 +0200


On Sun, May 30, 1999 at 03:11:23PM -0400, Albert D. Cahalan wrote:

> Putting all the above into the kernel would reduce overall bloat.
> Think about it. Every damn executable has the same startup code.
> We'd save a page (few pages?) of code and data on every executable,
> as well as all the system calls:
>
> All open() and close() calls are junk.
> All mmap() calls may be replaced by direct VM manipulation.
> All munmap() and mprotect() calls are junk.
> The fstat() call is junk, since the kernel can just look.
> The personality() call is junk. (directly read it)
> The getpid() call is junk. (provide it in user-readable memory)
>
> On every exec, that kills 16 system calls and a bit of IO.

The same arguments could be used to put every application into the kernel.
The dynamic linker is a pretty complex piece of code that directly acts
with the execution of the program at run time by dynamic linking. That
would be a few dozen more syscalls with a kernel dl. Also it's pretty
libc dependant.

Ralf

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/