freebsd-dev/gnu/usr.bin/ld
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
..
i386 Changed the terminology for what used to be called the "memorizing" 1995-11-02 18:48:15 +00:00
ldconfig Reset the umask before creating the output file; otherwise running 1995-08-16 06:31:50 +00:00
ldd Updated to recent version of Paul K.'s shlib code. This code has better 1994-12-23 22:31:35 +00:00
rtld Changed the terminology for what used to be called the "memorizing" 1995-11-02 18:48:15 +00:00
sparc Weak symbol support from NetBSD. This should bring us in sync with the 1995-03-04 17:49:20 +00:00
cplus-dem.c Remove trailing whitespace. 1995-05-30 05:05:38 +00:00
etc.c Changes from Paul Kranenburg which bring us into sync with his sources: 1994-06-15 22:41:19 +00:00
ld.1 Updated to recent version of Paul K.'s shlib code. This code has better 1994-12-23 22:31:35 +00:00
ld.1aout Updated to recent version of Paul K.'s shlib code. This code has better 1994-12-23 22:31:35 +00:00
ld.c Remove LD_NOSTD_PATH implementation, it isn't works and 1995-10-24 06:48:16 +00:00
ld.h Remove trailing whitespace. 1995-05-30 05:05:38 +00:00
lib.c Fix checks for open() failing. open() may successfully return 0. 1995-09-28 19:43:22 +00:00
Makefile Stop using gnumalloc. 1995-09-22 14:14:32 +00:00
PORTING New file from pk to aid new in developing the shlib code for new 1994-12-23 22:56:08 +00:00
rrs.c Weak symbol support from NetBSD. This should bring us in sync with the 1995-03-04 17:49:20 +00:00
shlib.c Removed /usr/local/lib from the standard library search path to be 1995-03-19 21:20:09 +00:00
symbol.c Updated to recent version of Paul K.'s shlib code. This code has better 1994-12-23 22:31:35 +00:00
symseg.h Remove trailing whitespace. 1995-05-30 05:05:38 +00:00
TODO Added the TODO file. Also wanted to announce the previous change to rtld.c 1993-12-09 17:53:08 +00:00
warnings.c Weak symbol support from NetBSD. This should bring us in sync with the 1995-03-04 17:49:20 +00:00
xbits.c This is Paul K's latest set of ld changes. A commit was necessary at this 1994-02-13 20:43:13 +00:00