summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/rtld.1
Commit message (Collapse)AuthorAgeFilesLines
* Import the DragonFly BSD commit 4f0bc915b65fcf5a23214f6d221d65c80be68ad4kib2012-07-151-7/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by John Marino <draco@marino.st>, with the following (edited) commit message Date: Sat, 24 Mar 2012 06:40:50 +0100 Subject: [PATCH 1/1] rtld: Implement DT_RUNPATH and -z nodefaultlib DT_RUNPATH is incorrectly being considered as an alias of DT_RPATH. The purpose of DT_RUNPATH is to have two different types of rpath: one that can be overridden by the environment variable LD_LIBRARY_PATH and one that can't. With the currently implementation, LD_LIBRARY_PATH will always trump any embedded rpath or runpath tags. Current path search order by rtld: ================================== LD_LIBRARY_PATH DT_RPATH / DT_RUNPATH (always the same) ldconfig hints file (default: /var/run/ld-elf.so.hints) /usr/lib New path search order by rtld: ============================== DT_RPATH of the calling object if no DT_RUNPATH DT_RPATH of the main binary if no DT_RUNPATH and binary isn't calling obj LD_LIBRARY_PATH DT_RUNPATH ldconfig hints file /usr/lib The new path search matches how the linux runtime loader works. The other major added feature is support for linker flag "-z nodefaultlib". When this flag is passed to the linker, rtld will skip all references to the standard library search path ("/usr/lib" in this case but it could handle more color delimited paths) except in DT_RPATH and DT_RUNPATH. New path search order by rtld with -z nodefaultlib flag set: ============================================================ DT_RPATH of the calling object if no DT_RUNPATH DT_RPATH of the main binary if no DT_RUNPATH and binary isn't calling obj LD_LIBRARY_PATH DT_RUNPATH ldconfig hints file (skips all references to /usr/lib) FreeBSD notes: - we fixed some bugs which were submitted to DragonFly and merged there as commit 1ff8a2bd3eb6e5587174c6a983303ea3a79e0002; - we added LD_LIBRARY_PATH_RPATH environment variable to switch to the previous behaviour of considering DT_RPATH a synonym for DT_RUNPATH; - the FreeBSD default search path is /lib:/usr/lib and not /usr/lib. Reviewed by: kan MFC after: 1 month MFC note: flip the ld_library_path_rpath default value for stable/9
* Implement support for ELF filters in rtld. Both normal and auxillarykib2010-12-251-0/+8
| | | | | | | | | | | | | | | | | filters are implemented. Filtees are loaded on demand, unless LD_LOADFLTR environment variable is set or -z loadfltr was specified during the linking. This forces rtld to upgrade read-locked rtld_bind_lock to write lock when it encounters an object with filter during symbol lookup. Consolidate common arguments of the symbol lookup functions in the SymLook structure. Track the state of the rtld locks in the RtldLockState structure. Pass local RtldLockState through the rtld symbol lookup calls to allow lock upgrades. Reviewed by: kan Tested by: Mykola Dzham <i levsha me>, nwhitehorn (powerpc)
* mdoc: drop redundant .Pp and .LP callsuqs2010-10-081-1/+0
| | | | They have no effect when coming in pairs, or before .Bl/.Bd
* Document RTLD_NODELETE, -z nodelete and -z origin support.kib2009-04-011-1/+20
|
* Support for a new environment variable, LD_ELF_HINTS_PATH for overridingdelphij2009-03-231-1/+6
| | | | | | | | | | | the rtld hints file. This environment variable would be unset if the process is considered as tainted with setuid/setgid. This feature gives a convenient way of using a custom set of shared library that is not located in the default location and switch back. Feature requested by: iXsystems Original patch by: John Hixson MFC after: 2 weeks
* Make the meaning of the %A format specifier, as passed tobms2008-05-151-2/+5
| | | | LD_TRACE_LOADED_OBJECTS_FMT[12], more obvious for users like me.
* Update the man page to reflect that certain variables will be unset incsjp2007-05-171-2/+4
| | | | | the case that the program is set-user-ID or set-group-ID. Add missing annotations for LIBMAP and LIBMAP_DISABLE.
* Remove %m formatter, it's ifdef 0'ed in the code from the very beginningpav2007-05-121-2/+0
| | | | MFC after: 1 week
* Expand documentation for LD_TRACE_LOADED_OBJECTS_FMT? variablespav2007-05-121-0/+6
| | | | | | PR: docs/66265 (inspired by) Submitted by: Michel Lavondes <fox@vader.aacc.cc.md.us> MFC after: 1 week
* Document LD_UTRACE.jhb2007-01-231-2/+7
| | | | MFC after: 3 days
* Markup fixes.ru2006-09-171-2/+4
|
* - Document LD_32_* environment variablespav2006-03-271-2/+9
| | | | | | - Mention 32-bit files in FILES section MFC after: 1 week
* Removed trailing whitespace.ru2005-06-141-2/+2
| | | | Approved by: re (blanket)
* Description from Dan:mdodd2005-02-041-1/+14
| | | | | | | | | | | | | | | 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
* LD_DUMP_REL_PRE and LD_DUMP_REL_POST don't output to stderr; don'tmdodd2003-06-191-2/+2
| | | | claim that they do.
* Provide a mechanism for dumping relocation information.mdodd2003-06-191-0/+10
| | | | | | | Setting the LD_DUMP_REL_PRE or LD_DUMP_REL_POST environment variables cause rtld-elf to output a table of all relocations. This is useful for debugging.
* Assorted mdoc(7) fixes.ru2003-06-021-5/+5
|
* Use the environment variable LD_LIBMAP_DISABLE to disablemdodd2003-05-311-0/+3
| | | | libmap.conf(5) functionality.
* Since libmap.conf is referenced in rtld.1, include it in the referencesrwatson2003-05-171-0/+1
| | | | | | section. Approved by: re (scottl)
* mdoc(7) police: Normalize the FILES section.ru2003-05-161-2/+3
| | | | Approved by: re (blanket)
* Dynamic object dependency mapping: libmap.mdodd2003-04-071-0/+2
| | | | | | | This is an optional feature, disabled by default. This will be useful to people testing the various POSIX threading libraries under -CURRENT but can easily serve other needs.
* Advertize rtld(1) as ld.so(1) in manual pages worldphantom2003-02-131-0/+1
|
* Uniformly refer to a file system as "file system".ru2002-12-121-1/+1
| | | | Approved by: re
* The .Nm utilitycharnier2002-07-061-2/+6
|
* Add support such that if LD_TRACE_LOADED_OBJECTS_ALL is defined to aobrien2002-02-171-0/+5
| | | | | | | | non-empty string in the environment; we indicate which objects caused each object to be loaded. PR: 30908 Submitted-by: Mike Meyer <mwm@mired.org>
* mdoc(7) police: tidy up.ru2002-01-101-17/+25
|
* mdoc(7) police:ru2001-08-071-4/+2
| | | | | | | Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text. Not only this slows down the mdoc(7) processing significantly, but it also has an undesired (in this case) effect of disabling hyphenation within the entire enclosed block.
* mdoc(7) police: removed HISTORY info from the .Os call.ru2001-07-101-1/+1
|
* mdoc(7) police: remove extraneous .Pp before and/or after .Sh.dd2001-07-091-2/+0
|
* mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2).ru2001-07-061-1/+1
|
* Prepare for mdoc(7)NG.ru2001-01-161-1/+1
|
* Prepare for mdoc(7)NG.ru2000-12-201-3/+5
|
* Only punctuation is an allowed argument type for open-close macrossheldonh2000-06-301-1/+2
| | | | | | such as Po/Pc, as explained by phantom. Reported by: billf
* Cross-reference ldd(1) in rtld(1) and vice versa.sheldonh2000-03-281-0/+1
|
* Add a manual page for the ELF dynamic linker. I initially createdjdp2000-01-291-98/+20
| | | | | | 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.
* .Nm += "rtld"phantom1999-09-281-1/+2
| | | | apropos(1) now knows about rtld(1) manpage.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* 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>
OpenPOWER on IntegriCloud