gabriel rosenkoetter on Mon, 4 Jun 2001 10:00:06 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] ELF Init section


On Mon, Jun 04, 2001 at 09:14:27AM -0400, Tim Peeler wrote:
> Somthing I find particularly interesting in the ELF format is the specific
> header format.  Given that the loader needs to combine the binary and
> system and library calls to create the running process in the first place,
> one would assume that you would only need an identifier for each part
> of the header, instead of the strict structured header that ELF provides.

I think a problem with this approach is that, as things stand now,
file headers are mmap()ed by ld.so when they need to be run.

If you don't know how many bytes you're going to need to read, you
need to open a file handle and read them one by one into an internal
buffer. This wastes virtual memory (mmap()ed files are backed by
themselves on disk, not by swap) and time (mmap()ed grabs a large
chunk of the file off disk in one IO rather than a bunch of
sequential IOs reading it into various variables declared by the
running program).

I can't see how this would be anything but a speed loss.

       ~ g r @ eclipsed.net


______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug