lkml.org 
[lkml]   [1999]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: dso loading question
Date


> -----Original Message-----
> From: Albert D. Cahalan [SMTP:acahalan@cs.uml.edu]
> Sent: Monday, May 31, 1999 5:11 AM
> To: linux-kernel@vger.rutgers.edu
> Cc: ralf@uni-koblenz.de
> Subject: Re: dso loading question
>
>
> Ralf Baechle writes:
> > On Wed, May 26, 1999 at 09:44:41PM -0700, Kanoj Sarcar wrote:
>
> >> I am trying to understand how the glibc ld-linux code works just after
> >> program startup. I have a small program
> ...
> > mprotect calls may be necessary for mapping areas which are mapped
> without
> > write access but where relocations need to be applied to.
> ...
> > Read glibc/sysdeps/unix/sysv/linux/init-first.c. Actually the entire
> > startuped & libc initialization code. It's quite complex.
> >
> > Btw, this all is done in userspace, therefore nothing for linux-kernel
> or
> > linux-mm.
>
> 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.
>
[Greg Smart] That may be true, but those 16 system calls are
replaced
with some other interface which is further into user space. Also the
functions
above look to me like they prevent some access which could
potentially
cause things to break in a horrible way. The way I see it, the
smaller the
kernel is the better, mainly for scalability.

cheers
Greg
> -
>

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.045 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site