aboutsummaryrefslogtreecommitdiff
path: root/libexec/rtld-elf
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create branch 'RELENG_4_6'.cvs2svn2002-07-036-181/+23
| | | | Notes: svn path=/releng/4.6/; revision=99348
* MFC: Update the asm statements to use the "+" modifier instead ofJohn Polstra2002-07-022-8/+8
| | | | | | | | | | matching constraints where appropriate. The revisions merged are: lockdflt.c 1.7 rtld_machdep.h 1.7 Notes: svn path=/stable/4/; revision=99245
* MFC 1.16 (alpha alloca -> mmap fix)Matthew Dillon2002-06-221-5/+17
| | | | | | | | Reviewed by: obrien Approved by: jdp Notes: svn path=/stable/4/; revision=98628
* MFC 1.16: Remove maintainer line.John Polstra2002-06-221-1/+0
| | | | Notes: svn path=/stable/4/; revision=98621
* MFC 1.10 - replace alloca() with mmap() to avoid unbounded stack usage.Matthew Dillon2002-06-161-9/+21
| | | | | | | | | | | This solves problem when installing openoffice from ports and may also solve some of the instability issues with large GUI programs like Mozilla, Konq, etc (thread stacks were being overrun). Approved by: jdp Notes: svn path=/stable/4/; revision=98303
* MFC: (1.61) When searching an object on the global list, search its DAG too.Dag-Erling Smørgrav2002-04-021-3/+6
| | | | | | | PR: bin/25059 Notes: svn path=/stable/4/; revision=93703
* MFC:David Malone2002-03-041-1/+0
| | | | | | | | Change brk's prototype from char *brk(const char *) to int brk(const void *) and sbrk's prototype from char *sbrk(int) to void *sbrk(intptr_t). Notes: svn path=/stable/4/; revision=91631
* This commit was manufactured by cvs2svn to create branch 'RELENG_4'.cvs2svn2002-02-221-0/+135
| | | | Notes: svn path=/stable/4/; revision=91044
* MFC: allow ldd(1) be used on shlibs.Maxim Sobolev2002-02-181-9/+35
| | | | Notes: svn path=/stable/4/; revision=90837
* MFC 1.56: give LD_LIBRARY_PATH higher precedence.John Polstra2002-02-111-2/+2
| | | | | | | PR: bin/28191 Notes: svn path=/stable/4/; revision=90498
* MFC: 1.27: tidy up the markup.Ruslan Ermilov2002-01-101-17/+25
| | | | | | | Approved by: re (blanket) Notes: svn path=/stable/4/; revision=89231
* MFC: Fix find_symdef() cache.Doug Rabson2001-10-171-8/+9
| | | | Notes: svn path=/stable/4/; revision=85047
* MFC: markup and misc fixes.Ruslan Ermilov2001-08-161-6/+4
| | | | | | | Approved by: re Notes: svn path=/stable/4/; revision=81771
* MFC: 1.15: Use new backup feature of install(1).Ruslan Ermilov2001-08-081-14/+1
| | | | | | | Approved by: re Notes: svn path=/stable/4/; revision=81269
* MFC: remove extraneous .Pp before and/or after .Sh.Dima Dorfman2001-07-221-2/+0
| | | | Notes: svn path=/stable/4/; revision=80140
* MFC: * Most of existing include/elf.h is in elf-hints.h.David E. O'Brien2001-07-111-1/+2
| | | | | | | | | | | elf.h is now a compatibility header with Solaris/SVR4. * Consumers of elf.h now use the minimalist elf header possible. This change is motivated by Binutils 2.11 and too much clashing over our base elf headers and the Binutils elf headers. Notes: svn path=/stable/4/; revision=79604
* MFC: Performance improvements. Includes the following revisions:John Polstra2001-05-114-14/+51
| | | | | | | | | | rtld.c 1.52 rtld.h 1.22 alpha/reloc.c 1.12 i386/reloc.c 1.7 Notes: svn path=/stable/4/; revision=76453
* MFC: MAN[1-9] -> MAN.Ruslan Ermilov2001-04-251-1/+1
| | | | Notes: svn path=/stable/4/; revision=75952
* MFC 1.50 -> 1.51: Make it possible to call dlclose from aJohn Polstra2001-01-211-2/+43
| | | | | | | destructor. Notes: svn path=/stable/4/; revision=71308
* MFC: Prepare for mdoc(7)NG.Ruslan Ermilov2001-01-161-1/+1
| | | | Notes: svn path=/stable/4/; revision=71105
* MFC: Prepare for mdoc(7)NG.Ruslan Ermilov2000-12-201-3/+5
| | | | Notes: svn path=/stable/4/; revision=70228
* MFC: add /dev/zero and use PATH_* where possible.David E. O'Brien2000-12-111-2/+3
| | | | Notes: svn path=/stable/4/; revision=69839
* MFC 1.49 -> 1.50: Eliminate superfluous "Undefined symbol" errorJohn Polstra2000-11-081-2/+0
| | | | | | | | | message. Approved by: jkh Notes: svn path=/stable/4/; revision=68470
* MFC: Add support for dlsym(RTLD_DEFAULT, ...).John Polstra2000-09-222-69/+97
| | | | | | | | | dlfcn.h: 1.10 -> 1.11 rtld.c: 1.48 -> 1.49 rtld.h: 1.19 -> 1.20 Notes: svn path=/stable/4/; revision=66203
* MFC 1.47 -> 1.48: Pass useful info to r_debug_state(), toJohn Polstra2000-09-221-8/+18
| | | | | | | be used by debuggers and/or trace tools. Notes: svn path=/stable/4/; revision=66202
* MFC: Call init and fini functions in a proper order based on theJohn Polstra2000-07-292-106/+185
| | | | | | | | | | interdependencies of the shared libraries. Includes these revisions: rtld.c 1.47 rtld.h 1.19 Notes: svn path=/stable/4/; revision=64010
* MFC: rev 1.13 (use install(1) rather than cp)David E. O'Brien2000-07-201-1/+2
| | | | Notes: svn path=/stable/4/; revision=63640
* MFC: Block signals while holding the exclusive lock to avoid lockingJohn Polstra2000-07-182-3/+56
| | | | | | | | | | | | | | | | | | | against self. The revisions merged are: alpha/lockdflt.c: 1.5 -> 1.6 i386/lockdflt.c: 1.5 -> 1.6 I discussed this merge with the release engineer and we agreed that this particular merge would best be done as soon as possible, rather than waiting until just before the 4.1 code freeze when it couldn't receive the benefit of testing with the ports it is intended to fix. (It should fix Mozilla and other user threads based programs. And it should fail to break any linuxthreads based programs.) Approved by: jkh Notes: svn path=/stable/4/; revision=63370
* MFC: Use spinlocks + nanosleep for thread locking to make it workJohn Polstra2000-07-126-214/+232
| | | | | | | | | | | | | | | | | with all threads packages. Revamp data structures to allow non-exclusive locking in most cases. Deprecate dllockinit() and make it a do-nothing stub. Merges in the following deltas: src/libexec/rtld-elf/rtld.c 1.46 src/libexec/rtld-elf/rtld.h 1.18 src/libexec/rtld-elf/alpha/lockdflt.c 1.5 src/libexec/rtld-elf/alpha/rtld_machdep.h 1.4 src/libexec/rtld-elf/alpha/rtld_start.S 1.4 src/libexec/rtld-elf/i386/lockdflt.c 1.5 src/libexec/rtld-elf/i386/rtld_machdep.h 1.4 Notes: svn path=/stable/4/; revision=62998
* MFC 1.10 -> 1.11: Eliminate unaligned accesses while relocating.John Polstra2000-07-121-12/+27
| | | | Notes: svn path=/stable/4/; revision=62996
* MFC 1.19 -> 1.20: Fix .Po usage.John Polstra2000-07-121-1/+2
| | | | Notes: svn path=/stable/4/; revision=62994
* MFC 1.10 -> 1.11: Fix missing DPADDs and some style bugs.John Polstra2000-07-121-4/+5
| | | | Notes: svn path=/stable/4/; revision=62993
* This commit was manufactured by cvs2svn to create branch 'RELENG_4'.cvs2svn2000-07-102-0/+411
| | | | Notes: svn path=/stable/4/; revision=62923
* MFC: rev 1.12 (save previous dynamic linker)David E. O'Brien2000-07-081-0/+12
| | | | Notes: svn path=/stable/4/; revision=62818
* MFC: Cross-reference ldd(1) in rtld(1) and vice versa.Sheldon Hearn2000-03-281-0/+1
| | | | Notes: svn path=/stable/4/; revision=58723
* This commit was manufactured by cvs2svn to create branch 'RELENG_4'.cvs2svn2000-03-138-783/+0
| | | | Notes: svn path=/stable/4/; revision=57955
* Add a manual page for the ELF dynamic linker. I initially createdJohn Polstra2000-01-292-99/+22
| | | | | | | | | rtld.1 by means of a repository copy from "src/libexec/rtld-aout/rtld.1". Then I edited it to make it (more) accurate for the ELF dynamic linker. Notes: svn path=/head/; revision=56790
* When a threads package registers locking methods with dllockinit(),John Polstra2000-01-295-50/+137
| | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=56780
* Block almost all signals in the default locking method instead ofJohn Polstra2000-01-254-32/+40
| | | | | | | | | | | just a few of them. This looks like it solves the recent ld-elf.so.1: assert failed: /usr/src/libexec/rtld-elf/lockdflt.c:55 failures seen by some applications such as JDK. Notes: svn path=/head/; revision=56566
* Allow files in LD_PRELOAD to be separated by white space, like SolarisJohn Polstra2000-01-221-3/+4
| | | | | | | and Linux. Notes: svn path=/head/; revision=56405
* Revamp the mechanism for enumerating and calling shared objects'John Polstra2000-01-096-139/+187
| | | | | | | | | | | | | | | init and fini functions. Now the code is very careful to hold no locks when calling these functions. Thus the dynamic linker cannot be re-entered with a lock already held. Remove the tolerance for recursive locking that I added in revision 1.2 of dllockinit.c. Recursive locking shouldn't happen any more. Mozilla and JDK users: I'd appreciate confirmation that things still work right (or at least the same) with these changes. Notes: svn path=/head/; revision=55687
* Work around an assert failure in the dynamic linker's default threadJohn Polstra1999-12-284-16/+32
| | | | | | | | | | | | | | | | | | | locking functions. If an application loads a shared object with dlopen() and the shared object has an init function which requires lazy binding, then _rtld_bind is called when the thread is already inside the dynamic linker. This leads to a recursive acquisition of the lock, which I was not expecting -- hence the assert failure. This work-around makes the default locking functions handle recursive locking. It is NOT the correct fix -- that should be implemented at the generic locking level rather than in the default locking functions. I will implement the correct fix in a future commit. Since the dllockinit() interface will likely need to change, warn about that in both the man page and the header file. Notes: svn path=/head/; revision=55165
* Add a new function dllockinit() for registering thread lockingJohn Polstra1999-12-2711-45/+509
| | | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=55122
* In revision 1.21 I changed the search order for shared libraries,John Polstra1999-11-191-1/+1
| | | | | | | | | | but I forgot to make the corresponding fix to the comment. Rectify that. Submitted by: Tony Finch <fanf@demon.net> Notes: svn path=/head/; revision=53400
* .Nm += "rtld"Alexey Zelkin1999-09-281-1/+2
| | | | | | | apropos(1) now knows about rtld(1) manpage. Notes: svn path=/head/; revision=51746
* Make jdk-1.1.8 work again. It turns out that some code insideJohn Polstra1999-09-051-5/+9
| | | | | | | | | | | | | | | | | | libjava peeks into the dynamic linker's private Obj_Entry structures. My recent changes introduced some new members near the front of the structures, causing libjava to get the wrong fields. This commit moves the new members toward the end of the structure so that the layout of the portion that is relevant to JDK remains the same as before. I will work with the JDK porting team to see if we can come up with a less fragile way for them to do what they need to do. I understand the current approach was necessary in order to work around some limitations of the dynamic linker. Maybe it's not necessary any more. Notes: svn path=/head/; revision=50977
* Enable -Wformat checking for debug_printf().John Polstra1999-09-041-1/+3
| | | | Notes: svn path=/head/; revision=50930
* Change the warning about unrecognized entries in the dynamic tableJohn Polstra1999-09-041-2/+2
| | | | | | | | | | to a debug message which is disabled in production builds of the dynamic linker. The condition warned about is normally harmless. PR: bin/12849 Notes: svn path=/head/; revision=50928
* When looking up symbols, search the objects loaded at program startJohn Polstra1999-09-041-8/+8
| | | | | | | | | | up first -- before the dlopened DAGs containing the referencing object. This makes dynamically loaded perl modules work properly again. Notes: svn path=/head/; revision=50873
* Get the actual pathname of the dynamic linker from the executable'sJohn Polstra1999-08-303-12/+31
| | | | | | | | | | PT_INTERP program header entry, to ensure that gdb always finds the right dynamic linker. Use obj->relocbase to simplify a few calculations where appropriate. Notes: svn path=/head/; revision=50610