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.
old PLT format, and one that works with the new.
XXX We currently always use _rtld_bind_start_old() in
_rtld_setup_alpha_pltgot(). We need to add code to peek
into one of the PLT entries to see which format it's in
and pick the correct binding routine.
use to find the end of the GOT, rather than relying on _DYNAMIC
to immediately follow the GOT. (A change in current binutils
moved _DYNAMIC, and thus would have broken our Alpha ld.elf_so).
* Add #ifdef'd out code to deal with the new PLT format.
no need to save the stack pointer. Just push the space for the cleanup
and obj_main pointers before calling _rtld(), and pop it after loading those
pointers into the appropriate argument registers for the program entry point.
kit, then hacked on by Matt Thomas <matt@3am-software.com>, then by me (to
make it work with new versions of the toolchain, etc.). This runs, but it's
in serious need of cleaning and/or a fair bit of reworking. See the README
file for more information, and a list of things to do.