Subject: CVS commit: basesrc/libexec/ld.elf_so/arch/alpha
To: None <source-changes@netbsd.org>
From: Jason R Thorpe <thorpej@netbsd.org>
List: source-changes
Date: 09/08/2002 05:48:29
Module Name:	basesrc
Committed By:	thorpej
Date:		Sun Sep  8 02:48:29 UTC 2002

Modified Files:
	basesrc/libexec/ld.elf_so/arch/alpha: alpha_reloc.c rtld_start.S

Log Message:
Fix a serious performance problem for large programs on the Alpha.

Large programs need multiple GOTs.  The lazy binding stub in the PLT
can be reached from any of these GOTs, but the dynamic linker only
has enough information to fix up the first GOT entry.  Thus, calls
through the other GOTs went through the time-consuming lazy binding
process on every call.

This fix rewrites the PLT entries themselves to bypass the lazy binding
for those GOT entries that the dynamic linker can't fixup.

Fix from FreeBSD.

Note that now that we patch up the PLT, we need to put back the "imb"
that was removed from the binder exit path.


To generate a diff of this commit:
cvs rdiff -r1.13 -r1.14 basesrc/libexec/ld.elf_so/arch/alpha/alpha_reloc.c
cvs rdiff -r1.9 -r1.10 basesrc/libexec/ld.elf_so/arch/alpha/rtld_start.S

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