summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf
Commit message (Collapse)AuthorAgeFilesLines
* *thwack*! all the world's not i386.des2006-03-291-0/+2
| | | | Pointy hat to: des
* Don't use dbg if it isn't defined (such as when this file is used bydes2006-03-281-0/+2
| | | | code outside of rtld-elf)
* Use C99's varadic macro syntax instead of gcc's.des2006-03-281-2/+2
|
* Er, forgot to clear tls space to zero for Variant II.davidxu2006-03-281-1/+1
|
* Allocate space for thread pointer, this allows thread library to accessdavidxu2006-03-284-4/+4
| | | | its pointer from begin, and simplifies _get_curthread() in libthr.
* - Document LD_32_* environment variablespav2006-03-271-2/+9
| | | | | | - Mention 32-bit files in FILES section MFC after: 1 week
* Fix a malloc overrun in 32-bit compat libmap lookup code.peter2006-01-311-6/+4
|
* s/DT_IA64_PLT_RESERVE/DT_IA_64_PLT_RESERVE/marcel2006-01-281-3/+3
|
* s/R_IA64_/R_IA_64_/marcel2006-01-281-6/+6
|
* s/R_IA64_/R_IA_64_/g as per the ia64 psABI.marcel2006-01-171-11/+11
|
* In preparation for a new malloc implementation:jasone2006-01-121-0/+16
| | | | | | | | | | | | | * Add posix_memalign(). * Move calloc() from calloc.c to malloc.c. Add a calloc() implementation in rtld-elf in order to make the loader happy (even though calloc() isn't used in rtld-elf). * Add _malloc_prefork() and _malloc_postfork(), and use them instead of directly manipulating __malloc_lock. Approved by: phk, markm (mentor)
* Make lookups for relocations from old unversioned binaries returnkan2005-12-241-17/+32
| | | | | | | | oldest versioned symbol available. Do not accept hidden symbols for all other versions. Use "<obj->path>: <error message>" for all error messages in new functions to make them more consistent.
* Remove debugging statement that slipped into lone of the previous commitskan2005-12-231-1/+0
| | | | unintentionally.
* Initialize object dagmembers list before checking version dependencies.kan2005-12-221-4/+2
|
* Implement ELF symbol versioning using GNU semantics. This code aimskan2005-12-189-133/+548
| | | | | | | | | 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.
* Make our ELF64 type definitions match standards. In particular thismarcel2005-12-183-11/+11
| | | | | | | | | | | | | means: o Remove Elf64_Quarter, o Redefine Elf64_Half to be 16-bit, o Redefine Elf64_Word to be 32-bit, o Add Elf64_Xword and Elf64_Sxword for 64-bit entities, o Use Elf_Size in MI code to abstract the difference between Elf32_Word and Elf64_Word. o Add Elf_Ssize as the signed counterpart of Elf_Size. MFC after: 2 weeks
* Explicitly cast ELF_R_TYPE() to the right type.marcel2005-12-183-6/+6
|
* Fix a bug in dlinfo(RTLD_DI_SERINFOSIZE) requests. For each search pathjhb2005-11-111-1/+1
| | | | | | | | | | | | we included the length of the path in the returned size but not the length of the associated Dl_serpath structure. Without this fix, programs attempting to allocate a structure to hold the search path information would allocate too small of a buffer and rtld would overrun the buffer while filling it via a subsequent RTLD_DI_SERINFO request. Submitted by: "William K. Josephson" wkj at morphisms dot net Reviewed by: jdp MFC after: 2 weeks
* Clean out the leftovers from the i386_set_gsbase() TLS conversion.peter2005-06-291-17/+1
| | | | | | | | Like on libthr, there is an i386_set_gsbase() stub implementation here to avoid libc.so.5 issues. This should likely be a weak symbol and I expect this will be fixed soon. Approved by: re
* Removed trailing whitespace.ru2005-06-141-2/+2
| | | | Approved by: re (blanket)
* MFNetBSD: src/libexec/ld.elf_so/arch/sparc64/mdreloc.c 1.26 (partial)marius2005-06-041-1/+1
| | | | | | | Fix an obvious bug in the 64-bit PLT fixup: the SLLX was by 12 bits, when it should be 32. MFC after: 1 month
* 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)
* Align the stack to a 16 byte boundary before calling _rtld so that we candfr2005-05-191-3/+6
| | | | | | safely initialise shared libraries that use SSE in their init sections. MFC After: 1 week
* Fix compilation problem.davidxu2005-04-271-1/+1
|
* Stop calling _amd64_set_gsbase() for COMPAT_32BIT. The amd64 kernelpeter2005-04-261-9/+2
| | | | implements i386_set_gsbase(), so there is no need for the variation.
* Attempt to use i386_set_gsbase(), and gracefully fall back to LDT methodspeter2005-04-141-13/+16
| | | | if the direct access methods are not implemented.
* No need to provide atomic_cmpset_32() anymore.cognet2005-04-071-12/+0
|
* When allocating TLS and DTV, make sure that any unused slots in the DTVdfr2005-03-301-8/+4
| | | | | | | | are initialised to zero. When freeing TLS, don't attempt to free DTV slots which were not used. Pointed out by: Joerg Sonnenberger X-MFC-After: After the branch, probably
* If "dangerous" environment variables (LD_PRELOAD, LD_LIBMAP,cperciva2005-03-241-1/+24
| | | | | | | | | | | | | LD_LIBMAP_DISABLE, LD_LIBRARY_PATH) are used, then make sure the libraries being loaded aren't on a noexec-mounted filesystem. This is a compromise position: I'm assuming that nobody will be silly enough to set the noexec mount flag on part of the default library path, in order to avoid adding extra overhead into the common case (where those environment variables aren't used). Discussed with: csjp, secteam MFC after: 1 week
* Add locking code for tls routines.davidxu2005-03-201-4/+21
|
* Attempt to free any static TLS space used by a shared library when itdfr2005-02-273-0/+24
| | | | | | | is unloaded. This allows applications which load and unload libraries like libGL.so.1 several times to work properly. MFC after: 2 days
* Only provide the dummy, non-atomic atomic_cmpset_32() ifcognet2005-02-261-0/+2
| | | | ARM_HAS_ATOMIC_CMPSET_32 isn't defined.
* Description from Dan:mdodd2005-02-044-13/+93
| | | | | | | | | | | | | | | Another handy libmap patch. Lets you do stuff like this: LD_LIBMAP="libpthread.so.1=libthr.so.1" mythreadedapp If you already have a program-specific override in libmap.conf, note that you must use a program-specific override in LD_LIBMAP: LD_LIBMAP="[mythreadedapp],libpthread.so.1=libthr.so.1" mythreadedapp PR: bin/74471 Submitted by: Dan Nelson <dnelson AT allantgroup.com> MFC after: 2 weeks
* style(9)mdodd2005-02-041-4/+3
|
* Implement a dummy atomic_cmpset_32(). It should be safe to use it in rtld ascognet2004-11-231-0/+11
| | | | the signals are masked anyway.
* Remove 80386 support from the ELF run time linker.jhb2004-11-162-163/+0
|
* So do it like we do in usr.bin/tip/tip/Makefile. ;)ru2004-11-141-0/+2
|
* Revert previous commit. As ru explains:schweikh2004-11-141-1/+1
| | | | | | | | | | | In the old world (as the surrounding comment in makefile says), there was the /usr/libexec/ld-elf.so.1 binary which is now a symlink to /libexec/ld-elf.so.1. To symlink, we need to make sure that the _target_ (and the target is /usr/libexec/ld-elf.so.1) doesn't have "schg" flag set. A real solution is to protect the chflags call only if target exists, like we do in usr.bin/tip/tip/Makefile. Requested by: ru
* Avoid an (ignored) error by invoking chflags on the link target, not theschweikh2004-11-141-1/+1
| | | | | | | | symlink. PR: kern/73016 Submitted by: John E. Hein <jhein@timing.com> MFC after: 1 week
* Remove these unused files before any other archs include the same bogusjhb2004-11-126-1057/+0
| | | | file.
* The 32 bit compatability ld-elf32.so.1 cannot use i386_set_ldt() whenpeter2004-11-061-0/+6
| | | | | running on an amd64 kernel. Use the recently exposed direct %fs/%gs set routines instead for the TLS setup of 32 bit binaries.
* Introduce the PRECIOUSPROG knob in bsd.prog.mk, similarru2004-11-031-1/+2
| | | | | | | | to PRECIOUSLIB from bsd.lib.mk. The side effect of this is making installing the world under jail(8) possible by using another knob, NOFSCHG. Reviewed by: oliver
* Implement TLS relocations for powerpc.ssouhlal2004-11-022-3/+73
| | | | Approved by: grehan (mentor)
* Do the TLS offset allocations before relocations, as otherwise theressouhlal2004-11-021-11/+11
| | | | | | | can be overlap in the TLS offsets, if the relocations are done in a certain order. Approved by: dfr, grehan (mentor)
* For variables that are only checked with defined(), don't provideru2004-10-241-1/+1
| | | | any fake value.
* Don't try to relocate the dynamic loader in reloc_non_plt(). It has alreadycognet2004-09-281-1/+4
| | | | been done before.
* Use add instead of saving the sp in a register.cognet2004-09-281-2/+1
|
* Add stubs for TLS.cognet2004-09-234-16/+32
| | | | Arbitraly choose the 2nd variant until I figure out which one I should use.
* Add stubs for powerpc TLS.dfr2004-08-043-5/+43
| | | | Submitted by: ssouhlal
* Add support for Thread Local Storage.dfr2004-08-0314-2/+883
|
OpenPOWER on IntegriCloud