freebsd-nq/gnu
Nate Williams 1e37fc9d59 Changed the terminology for what used to be called the "memorizing"
vector.  Now it is called the "symbol caching" vector.  This was made
possible and unconfusing by other changes that allowed me to localize
everything having to do with the caching vector in the function
reloc_map().

Switched to alloca() for allocating the caching vector, and eliminated
the special mmap-based allocation routines.  Although this was motivated
by performance reasons, it led to significant simplification of the
code, and made it possible to confine the symbol caching code to the
single function reloc_map().

Got rid of the unnecessary and inefficient division loop at the
beginning of rtld().

Reduced the number of calls to getenv("LD_LIBRARY_PATH") to just 1, on
suggestion from <davidg@root.com>.

Added breaks out of the relocation loops when the relocation address is
found to be 0.  A relocation address of 0 is caused by an unused
relocation entry.  Unused relocation entries are caused by linking a
shared object with the "-Bsymbolic" switch.  The runtime linker itself
is linked that way, and the last 40% of its relocation entries are
unused.  Thus, breaking out of the loop on the first such entry is a
performance win when ld.so relocates itself.  As a side benefit, it
permits removing a test from md_relocate_simple() in
../i386/md-static-funcs.c.

Unused relocation entries in other shared objects (linked with
"-Bsymbolic") caused even bigger problems in previous versions of the
runtime linker. The runtime linker interpreted the unused entries as if
they were valid. That caused it to perform repeated relocations of the
first byte of the shared object.  In order to do that, it had to remap
the text segment writable.  Breaking out of the loop on the first unused
relocation entry solves that.

Submitted by:	John Polstra <jdp@polstra.com>
1995-11-02 18:48:15 +00:00
..
games Change install' to ${INSTALL}' so that default install flags can be 1995-07-25 00:37:58 +00:00
gnu2bmake Integrated GCC-2.6.1 -> GCC-2.6.2 changes. 1994-11-15 04:52:19 +00:00
include Change install' to ${INSTALL}' so that default install flags can be 1995-08-06 12:24:38 +00:00
lib Change install' to ${INSTALL}' so that default install flags can be 1995-08-06 12:24:38 +00:00
libexec Make it sgid dialer to read lockfiles 1995-09-15 00:05:07 +00:00
usr.bin Changed the terminology for what used to be called the "memorizing" 1995-11-02 18:48:15 +00:00
usr.sbin Add preliminary support for netgroup.byuser and netgroup.byhosts maps. 1995-10-26 18:00:35 +00:00
COPYING Updated GNU utilities 1993-06-18 04:22:21 +00:00
COPYING.LIB Adding GPL docs, make structure. 1993-06-18 06:05:45 +00:00
Makefile Hurm... I could have sworn I added usr.sbin to the top level GNU 1995-02-07 19:10:39 +00:00
Makefile.inc Added gdb/gas/ld to GNU makefiles 1993-06-29 09:54:26 +00:00