Tim Peeler on Mon, 4 Jun 2001 10:50:05 -0400 |
On Mon, Jun 04, 2001 at 09:49:27AM -0400, gabriel rosenkoetter wrote: > 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 That's a good point, speed would be comprimised by doing numerous reads on the file, and that speed loss would be more than the 40 some odd bytes of the header. But you do have to agree that it would make revisions to the ELF format easier to implement. But there is also the fact that any new revisions shouldn't really increase the header that much anyway (what having to deal with 50 bytes instead of 40???), so I can see the point of using the structured approach. Tim ______________________________________________________________________ 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
|
|