Source-Changes archive

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

CVS commit: basesrc/libexec/ld.elf_so



Module Name:    basesrc
Committed By:   mycroft
Date:           Mon Sep 23 23:56:50 UTC 2002

Modified Files:
        basesrc/libexec/ld.elf_so: load.c map_object.c reloc.c rtld.c rtld.h
            search.c symbol.c

Log Message:
Several small changes that shave 7-8% off the simple-exec-loop test:

* Rename _rtld_find_library() to _rtld_load_library().  It now calls
  _rtld_load_object() if necessary to actually load the object, rather
  than having the caller do it.  To do this, it also takes the `mode'
  argument that gets passed to _rtld_load_object().

* On a related note, remove _rtld_check_library(), and instead call
  _rtld_load_object() to instead try actually loading the object.  We
  save two extra namei's and a bunch of redundant work (almost
  literally the same code) this way.

* In _rtld_map_object(), mmap(2) the first page read-only, rather than
  read(2)ing it.

* In _rtld_symlook_obj(), compare the *second* character of the symbol
  name before calling strcmp().  (This first character is too
  frequently `_', and turns out to not be helpful, in libc.)

* Also in _rtld_symlook_obj(), remove the bogus STT_FUNC special case
  -- this also allows removing the `in_plt' argument to
  _rtld_symlook_list() and _rtld_symlook_obj().

Also:

* In _rtld_obj_from_addr(), rather than trying to look up `_end' in
  the each object, instead use obj->mapsize as the upper bound.


To generate a diff of this commit:
cvs rdiff -r1.18 -r1.19 basesrc/libexec/ld.elf_so/load.c
cvs rdiff -r1.15 -r1.16 basesrc/libexec/ld.elf_so/map_object.c
cvs rdiff -r1.68 -r1.69 basesrc/libexec/ld.elf_so/reloc.c
cvs rdiff -r1.66 -r1.67 basesrc/libexec/ld.elf_so/rtld.c
cvs rdiff -r1.52 -r1.53 basesrc/libexec/ld.elf_so/rtld.h
cvs rdiff -r1.10 -r1.11 basesrc/libexec/ld.elf_so/search.c
cvs rdiff -r1.19 -r1.20 basesrc/libexec/ld.elf_so/symbol.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index