summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/alpha/reloc.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove alpha left-overs.ru2006-08-221-531/+0
|
* Implement ELF symbol versioning using GNU semantics. This code aimskan2005-12-181-1/+3
| | | | | | | | | to be compatible with symbol versioning support as implemented by GNU libc and documented by http://people.redhat.com/~drepper/symbol-versioning and LSB 3.0. Implement dlvsym() function to allow lookups for a specific version of a given symbol.
* Explicitly cast ELF_R_TYPE() to the right type.marcel2005-12-181-2/+2
|
* Fix the load64 and store64 macros, created to handle 8-byte unalignedmarcel2005-06-021-6/+6
| | | | | | | | | | loads and stores (resp.) The ldq_u and stq_u instruction mask off the lower 3 bits of the final address before loading from or storing to the address, so as to avoid unaligned loads and stores. They do not themselves allow loads from or stores to unaligned addresses. Replace the macro definitions by a packed struct dereference. Submitted by: Richard Henderson (rth at twiddle dot net)
* Add support for Thread Local Storage.dfr2004-08-031-0/+22
|
* No need to zero fill memory, mmapped anonymously. Kernel willkan2003-03-141-2/+0
| | | | | | return pre-zeroed pages itself. Noticed by: jake
* Fix the handling of high PLT entries (> 32764) on sparc64. This requirestmm2002-11-181-3/+4
| | | | | | | | additional arguments to reloc_jmpslot(), which is why MI code and MD code of other platforms had to be changed. Reviewed by: jake Approved by: re
* This is the same alloca() fix as was committed for i386. David O'Briendillon2002-06-181-5/+17
| | | | | | | | tested the patch on -stable. Reviewed by: obrien Approved by: jdp MFC after: 3 days
* ld-elf.so.1 assumed a few too many things about the ordering of sectionspeter2002-02-181-4/+14
| | | | | | | | | | | | | | produced by ld(8) (ie: that _DYNAMIC immediately follows the _GOT). The new binutils import changed that, and the intial GOT relocation broke. Use a custom linker script to provide a real end-of-GOT symbol. Update ld.so to deal with the new (faster) PLT format that gcc-3.1 and binutils can produce. This is probably incomplete, but appears to be working again. Obtained from: NetBSD (And a fix to a silly mistake that I made by: gallatin)
* Add ia64 support. Various adjustments were made to existing targets todfr2001-10-151-5/+9
| | | | | cope with a few interface changes required by the ia64. In particular, function pointers on ia64 need special treatment in rtld.
* The support for accelerating find_symdef() with a cache was broken. Thisdfr2001-10-101-8/+9
| | | | | | | | fixes the problem and improves startup times for large applications such as KDE2 considerably. Reviewed by: jdp MFC after: 1 week
* Performance improvements for the ELF dynamic linker. Thesejdp2001-05-051-4/+11
| | | | | | | | | | | | | | | | | | | | particularly help programs which load many shared libraries with a lot of relocations. Large C++ programs such as are found in KDE are a prime example. While relocating a shared object, maintain a vector of symbols which have already been looked up, directly indexed by symbol number. Typically, symbols which are referenced by a relocation entry are referenced by many of them. This is the same optimization I made to the a.out dynamic linker in 1995 (rtld.c revision 1.30). Also, compare the first character of a sought-after symbol with its symbol table entry before calling strcmp(). On a PII/400 these changes reduce the start-up time of a typical KDE program from 833 msec (elapsed) to 370 msec. MFC after: 5 days
* Eliminate unaligned accesses that occurred when relocating thejdp2000-05-221-12/+27
| | | | | | DWARF2 exception tables emitted by the compiler for C++ sources. These tables are tightly packed, and they contain some relocated addresses which are not well-aligned.
* When a threads package registers locking methods with dllockinit(),jdp2000-01-291-21/+47
| | | | | | | | | | figure out which shared object(s) contain the the locking methods and fully bind those objects as if they had been loaded with LD_BIND_NOW=1. The goal is to keep the locking methods from requiring any lazy binding. Otherwise infinite recursion occurs in _rtld_bind. This fixes the infinite recursion problem in the linuxthreads port.
* Add a new function dllockinit() for registering thread lockingjdp1999-12-271-9/+0
| | | | | | | | | | | | | | | | | | | functions to be used by the dynamic linker. This can be called by threads packages at start-up time. I will add the call to libc_r soon. Also add a default locking method that is used up until dllockinit() is called. The default method works by blocking SIGVTALRM, SIGPROF, and SIGALRM in critical sections. It is based on the observation that most user-space threads packages implement thread preemption with one of these signals (usually SIGVTALRM). The dynamic linker has never been reentrant, but it became less reentrant in revision 1.34 of "src/libexec/rtld-elf/rtld.c". Starting with that revision, multiple threads each doing lazy binding could interfere with each other. The usual symptom was that a symbol was falsely reported as undefined at start-up time. It was rare but not unseen. This commit fixes it.
* Revamp the symbol lookup algorithm to cope better with objectsjdp1999-08-301-2/+1
| | | | | | | | | | | | | | | | | | | | | | loaded separately by dlopen that have global symbols with identical names. Viewing each dlopened object as a DAG which is linked by its DT_NEEDED entries in the dynamic table, the search order is as follows: * If the referencing object was linked with -Bsymbolic, search it internally. * Search all dlopened DAGs containing the referencing object. * Search all objects loaded at program start up. * Search all objects which were dlopened() using the RTLD_GLOBAL flag (which is now supported too). The search terminates as soon as a strong definition is found. Lacking that, the first weak definition is used. These rules match those of Solaris, as best I could determine them from its vague manual pages and the results of experiments I performed. PR: misc/12438
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Add code to 'handle' R_ALPHA_NONE relocations by ignoring them.dfr1999-07-121-1/+4
|
* Fix a serious performance bug for large programs on the Alpha,jdp1999-06-251-43/+161
| | | | | | | | | | | | | | | discovered by Hidetoshi Shimokawa. 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. Tested by Hidetoshi Shimokawa and Steve Price. Reviewed by: Doug Rabson <dfr@freebsd.org>
* Eliminate all machine-dependent code from the main source body andjdp1999-04-091-1/+14
| | | | | | | | | | | | | | | the Makefile, and move it down into the architecture-specific subdirectories. Eliminate an asm() statement for the i386. Make the dynamic linker work if it is built as an executable instead of as a shared library. See i386/Makefile.inc to find out how to do it. Note, this change is not enabled and it might never be enabled. But it might be useful in the future. Building the dynamic linker as an executable should make it start up faster, because it won't have any relocations. But in practice I suspect the difference is negligible.
* Add the r_addend of the relocation when processing GLOB_DAT relocations.dfr1998-09-111-3/+3
|
* Fix a cut&paste error which prevented LD_BIND_NOW from working.dfr1998-09-081-2/+2
|
* Add alpha support.dfr1998-09-041-0/+309
Submitted by: John Birrell <jb@cimlogic.com.au> (with extra hacks by me) Obtained from: Probably NetBSD
OpenPOWER on IntegriCloud