freebsd-src/gnu/usr.bin
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
..
as Stop using gnumalloc. 1995-09-22 14:14:32 +00:00
awk Add setlocale LC_CTYPE 1995-10-28 19:44:29 +00:00
bc Remove trailing whitespace. 1995-05-30 05:05:38 +00:00
binutils/gdb Remove trailing whitespace. 1995-05-30 05:05:38 +00:00
cc When building -static, link with special scrt0.o instead of crt0.o. This 1995-10-18 04:28:31 +00:00
cpio Add setlocale LC_ALL 1995-10-26 11:12:39 +00:00
cvs Put a bandaid on the NULL pointer dereference caused by doing an 1995-09-03 05:05:31 +00:00
dc Remove trailing whitespace. 1995-05-30 05:05:38 +00:00
dialog Remove trailing whitespace. 1995-05-30 05:05:38 +00:00
diff Add setlocale LC_CTYPE 1995-10-31 08:44:21 +00:00
diff3 Fixed non-conflict errors that occur when changes made to the local files are 1995-02-20 18:47:18 +00:00
gdb Remove trailing whitespace. 1995-05-30 05:05:38 +00:00
grep Add setlocale LC_CTYPE 1995-10-28 19:16:14 +00:00
groff Add setlocale LC_CTYPE 1995-10-28 14:30:50 +00:00
gzip Change install' to ${INSTALL}' so that default install flags can be 1995-07-25 00:37:58 +00:00
ld Changed the terminology for what used to be called the "memorizing" 1995-11-02 18:48:15 +00:00
man Rewrite and merge some bogus makefiles to create Makefile.shprog. Just 1995-10-21 14:27:19 +00:00
mkisofs Merge version 1.04 into HEAD. 1995-10-22 14:04:37 +00:00
patch Give "Index" specified filenames preference over other filenames specified 1995-09-14 04:33:35 +00:00
perl Change install' to ${INSTALL}' so that default install flags can be 1995-07-25 00:37:58 +00:00
pr Updated to GNU textutils-1.9 1993-11-08 17:07:38 +00:00
ptx Remove trailing whitespace. 1995-05-30 05:05:38 +00:00
rcs Remove the $ Log: ... $ lines from the comments in the files that had 1995-10-29 22:06:48 +00:00
sdiff Update to GNU diffutils 2.6 1993-11-12 07:05:40 +00:00
send-pr Add MLINKS for sendbug manpage. 1995-08-29 13:01:40 +00:00
sort Add setlocale LC_CTYPE 1995-10-28 19:29:58 +00:00
tar Add setlocale LC_ALL 1995-10-26 10:59:43 +00:00
texinfo Re-initialize the terminal after ^Z / fg. 1995-09-10 13:04:45 +00:00
yppush Add a dependency on the .x source file and avoid copying it. 1995-07-04 08:39:27 +00:00
Makefile Re-enabled cvs now that Rod is satisfied that it will work correctly. 1995-04-11 17:28:26 +00:00
Makefile.inc New files for relocated source code. 1994-01-30 00:31:51 +00:00