summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a MAINTAINER line naming myself. We control the vertical. Wejdp1999-07-091-1/+2
| | | | control the horizontal.
* Fix bug: if a dlopen() failed (e.g., because of undefined symbols),jdp1999-07-091-38/+44
| | | | | | | | | | the dynamic linker didn't clean up properly. A subsequent dlopen() of the same object would appear to succeed. Another excellent fix from Max Khon. PR: bin/12471 Submitted by: Max Khon <fjoe@iclub.nsu.ru>
* Shake hands with GDB a little bit earlier so that it is possible tojdp1999-07-031-3/+3
| | | | | | debug the init functions. Submitted by: dfr
* Fix a reference counting problem when using dlopen(NULL, ...).jdp1999-06-251-3/+4
| | | | PR: bin/12129
* Fix a serious performance bug for large programs on the Alpha,jdp1999-06-257-103/+231
| | | | | | | | | | | | | | | 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>
* Back out my change from 6 April PDT that added a new dlversion()jdp1999-04-221-16/+1
| | | | | | | function. It was an ill-considered feature. It didn't solve the problem I wanted it to solve. And it added Yet Another Version Number that would have to be maintained at every release point. I'm nuking it now before anybody grows too fond of it.
* After relocating the main program, but before calling any of thejdp1999-04-211-7/+33
| | | | | | _init() functions, initialize the global variables "__progname" and "environ". This makes it possible for the _init() functions to call things like getenv() and err().
* The ELF specification says that the RPATH in the executable orjdp1999-04-091-4/+4
| | | | | shared object takes precedence over LD_LIBRARY_PATH. Make the dynamic linker do it that way.
* Eliminate all machine-dependent code from the main source body andjdp1999-04-0914-88/+488
| | | | | | | | | | | | | | | 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.
* Fix a couple of typos in comments.jdp1999-04-071-3/+3
|
* Add a new function dlversion() which returns the version number ofjdp1999-04-071-1/+16
| | | | | | the dynamic linker in the same form as __FreeBSD_version. This is mainly intended for checking the dynamic linker version during a make world.
* Resolve undefined weak references to a value of 0. This solves thejdp1999-04-051-1/+13
| | | | | | "__deregister_frame_info" problem that was seen when combining a program linked using the old gcc with shared libraries that were built using egcs.
* If somebody does an execv("foo", NULL) (which theoretically is an error),peter1999-04-041-2/+2
| | | | | | | avoid crashing inside rtld (since it's easy) since everything else handles it. Of course, if the target program checks argv[], it'll fall over. Reviewed by: jdp
* - Commit the correct dladdr() implementation.nate1999-03-241-7/+14
| | | | Reviewed by: jdp@FreeBSD.org <This is the version he reviewed!>
* - Added dladdr(3) support.nate1999-03-241-1/+47
| | | | Reviewed by: jdp@FreeBSD.org
* - Set the system immutable flag when installing ld.so to avoid peoplenate1999-02-151-2/+3
| | | | | | accidentally clobbering it. Submitted by: numberous people on -current
* Use the runpath of the main program for locating libraries loaded bydfr1998-11-271-2/+2
| | | | | | dlopen(). Reviewed by: jdp
* Fix a bug in dlclose that broke the apache13 port. The list ofjdp1998-10-131-1/+2
| | | | loaded objects wasn't being maintained properly.
* Make LD_PRELOAD work for ELF.jdp1998-09-221-1/+38
|
* Fix a bug that showed up when debugging dynamically linked programs.jdp1998-09-161-3/+13
| | | | | | | | | | | | | | | | | | | References from GDB to "printf" and various other functions would find the versions in the dynamic linker itself, rather than the versions in the program's libc. This fix moves the GDB link map entry for the dynamic linker to the end of the search list, where its symbols will be found only if they are not found anywhere else. It was suggested by Doug Rabson, though I implemented it a little differently. I personally would prefer to leave the dynamic linker's entry out of the GDB search list altogether. But Doug argues that it is handy there for such things as setting breakpoints on dlopen(). So it stays for now, at least. Note, if we ever integrate the dynamic linker with libc (which has several important benefits to recommend it), this whole problem goes away.
* Make the pathname pointed to by the Obj_Entry structure for thejdp1998-09-151-3/+11
| | | | | | dynamic linker itself dynamically allocated. All of them are supposed to be dynamically allocated, but we cheated before. It made gdb unhappy under some circumstances.
* Update to the binutils-2.9.1 PLT format.dfr1998-09-111-2/+4
|
* 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
|
* Implement ldconfig functionality for ELF. The hints are stored injdp1998-09-051-3/+50
| | | | | | | | | | | | | | | | | | | | | | | a different file than the a.out hints, namely, "/var/run/ld-elf.so.hints". These hints consist only of the directory search path. There is no hash table as in the a.out hints, because ELF doesn't have to search for the file with the highest minor version number. (It doesn't have minor version numbers at all.) A single run of ldconfig updates either the a.out hints or the ELF hints, but not both. The set of hints to process is selected in the usual way, via /etc/objformat, or ${OBJFORMAT}, or the "-aout" or "-elf" command line option. The rationale is that you probably want to search different directories for ELF than for a.out. "ldconfig -r" is faked up to produce output like we are used to, except that for ELF there are no minor version numbers. This should enable "ldconfig -r" to be used for checking LIB_DEPENDS in ports even for ELF. I implemented the ELF functionality in a new source file, with an eye toward eliminating the a.out code entirely at some point in the future.
* Add alpha support.dfr1998-09-0411-277/+1145
| | | | | Submitted by: John Birrell <jb@cimlogic.com.au> (with extra hacks by me) Obtained from: Probably NetBSD
* Suppress duplicate entries in ldd output.jdp1998-09-022-12/+12
|
* Style fixes. If it seems like a lot of lines of changes, it'sjdp1998-09-021-75/+79
| | | | | because I moved some functions. Mr. Tidy likes them to be in alphabetical order.
* Handle dlsym(NULL, ...) properly, by searching in the caller'sjdp1998-09-021-11/+26
| | | | | | | | shared object. Note, this searches _only_ that object, and not its needed objects, in accordance with the documentation. Also fix dlopen(NULL, ...) so that the executable's needed objects are searched as well as the executable itself.
* Update this header to use the revamped elf headers which select Elf32jb1998-08-211-12/+12
| | | | | | | | | or Elf64 based on the inclusion of the machine dependent header. I've left the addition of the extra fields to handle the relocation structures with addend for a separate commit after jdp has had a chance to review what I've done. The current change is needed to compile csu/alpha/crt1.c
* Add "-C" to INSTALLFLAGS to install atomically. An elf->elfjdp1998-08-171-1/+3
| | | | | installworld dies at this point otherwise, leaving the system without a dynamic linker.
* Add support for ldd.dfr1998-05-011-5/+106
|
* Add GDB support. The method and some of the code came from NetBSD's elfdfr1998-04-303-22/+102
| | | | runtime linker.
* This commit was generated by cvs2svn to compensate for changes in r34192,jdp1998-03-079-0/+2403
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Import the ELF dynamic linker. This is the ElfKit version withjdp1998-03-079-0/+2403
| | | | | | | quite a few enhancements and bug fixes. There are still some known deficiencies, but it should be adequate to get us started with ELF. Submitted by: John Polstra <jdp@polstra.com>
* Import the ELF dynamic linker. This is the ElfKit version withjdp1998-03-071-0/+83
| | | | | | | quite a few enhancements and bug fixes. There are still some known deficiencies, but it should be adequate to get us started with ELF. Submitted by: John Polstra <jdp@polstra.com>
* spelling corrections.wosch1997-09-131-3/+3
| | | | | PR: docs/4450 Submitted by: josh@quick.net
* Typo fix.max1997-05-271-3/+3
| | | | | PR: 3693 Submitted by: Kazuo Horikawa <k-horik@yk.rim.or.jp>
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Pay attention to the environment variable "LD_IGNORE_MISSING_OBJECTS".jdp1997-01-171-1/+25
| | | | | | | | | If it is set to a nonempty string, then simply skip any missing shared libraries. This came up in a discussion long ago as a potentially useful feature at sysinstall time. For example, an X11 utility could be used without the X libraries being present, provided the utility had a mode in which no X functions were actually called.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Sort cross references.wosch1997-01-131-3/+3
|
* Correct typos and spelling errors.jdp1997-01-121-5/+5
|
* Add support for the LD_BIND_NOW environment variable. If it is set to ajdp1997-01-121-7/+17
| | | | | | | | | | | | | | | | | | | | | nonempty string, then function calls are relocated at program start-up rather than lazily. This variable is standard on Sun and SVR4 systems. The dlopen() function now supports both lazy and immediate binding, as determined by its "mode" argument, which can be either 1 (RTLD_LAZY) or 2 (RTLD_NOW). I will add defines of these symbols to <dlfcn.h> as soon as I've done a little more checking to make sure they won't cause collisions or bootstrapping problems that would break "make world". The "LD_*" environment variables which alter dynamic linker behavior are now treated as unset if they are set to the empty string. This agrees with the standard SVR4 conventions for the dynamic linker. Add a work-around for programs compiled with certain buggy versions of crt0.o. The buggy versions failed to set the "crt_ldso" member of the interface structure. This caused certain error messages from the dynamic linker to begin with "(null)" instead of the pathname of the dynamic linker.
* Fix spelling error in manpage.swallace1996-12-261-2/+2
|
* Fix two minor typos in the manual page.jdp1996-10-181-3/+3
|
* Update to handle new version ld.so.hints and info in executable forpeter1996-10-011-2/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | configurable fallback search paths, as well as new crt interface version. Also: - even faster getenv(), get all environment variable settings in a single pass. - ldd printf-like format specifications - minor code cleanups, one vsprintf -> vsnprintf (harmless) The library search sequence is a little more complete now. Before, it'd search $LD_LIBRARY_PATH (by opendir/readdir/closedir), then read the hints file, then read /usr/lib (again by scanning thr directory). It would then fail if there was no "found" library. Now, it does LD_LIBRARY_PATH and the hints file the same, but then uses a longer fallback path. The -R path is fetched from the executable if specified at build time, the ldconfig path is appended, and /usr/lib is appended to that. Duplicates are suppressed. This means that simply placing a new library in /usr/local/lib will work (the same as it did in /usr/lib) without needing ldconfig -m. It will find it quicker if the ldconfig is run though. Similar changes have been made to the NetBSD ld.so, but ours is rather different now due to John Polstra's speedups and fixes from a while back. The ldd printf-like format support came direct from NetBSD. Reviewed by: nate, jdp
* add missing comma(s) in .Xr macroswosch1996-09-231-3/+3
|
* Implement support for LD_PRELOAD in the dynamic linker. Removejdp1996-04-201-10/+8
| | | | | | | descriptions of LD_NO_INTERN_SEARCH and LD_NOSTD_PATH from the manual page, since they are not supported. Submitted by: Doug Ambrisko <ambrisko@ambrisko.roble.com>
* This is a FreeBSD manpage, not a NetBSD manpage. :)nate1995-10-051-2/+2
|
OpenPOWER on IntegriCloud