summaryrefslogtreecommitdiff
path: root/libexec/ld.so/library.c
AgeCommit message (Collapse)Author
2006-05-08de-spaceTheo de Raadt
2006-05-03prebind - how to prelink a binary without throwing security out the windowDale Rahn
Prelink fixes the address of libraries making 'return to libc' attacks trival, prebind uses a different method to achieve most of the same gains, however without adding any security conerns. Still under development, now in-tree.
2005-11-09add RTLD_NOW support to dlopen and propogate -z now to dep libs.Kurt Miller
ok drahn@
2005-10-12add missing grpref unload propogation (sync with library_mquery)Kurt Miller
2005-10-12Split grpsym_list creation away from child_list creation and changeKurt Miller
grpsym_list order to match Sun's docs. Also corrects bugs where grpsym_list was either not created or partially created.
2005-10-09introduce object ref count macros (suggested by dale). no functionalKurt Miller
change.
2005-10-06separate load group references from dep lib child/dload lists. move loadKurt Miller
group refs to own per object ref counter (grprefcount) and list (grpref_list). corrects more complex load group ref cases and side effects from initial implementation. design ideas and ok drahn@
2005-10-03refcount corrections: count common dep libs once and centralize dep libKurt Miller
refcount increments to _dl_link_sub. adjust _dl_notify_unload_shlib to match new refcount method. ok drahn@
2005-10-01handle references to load groups caused by dlopen()ing of depenantDale Rahn
members of the load group. work by kurt@ and myself
2005-09-28correct last commit, in both files.Dale Rahn
2005-09-28keep a state flag if a library has been unloaded, and then free the listDale Rahn
seperately ok kurt@
2005-09-27increment refcount when opening a lib that is already open (dev/inodeKurt Miller
case) ok drahn@
2005-09-26Fully unload dependant libraries, fixes gphoto2 bug.Dale Rahn
2005-09-16Rework symbol lookup to more closely match sun's documentation, nowDale Rahn
treats dlopens as load groups. ok kurt@
2005-05-23fixes for dlclose, ok kettenis@Dale Rahn
2005-05-10Recommit the destructor order fix, now that the amd64 bug was fixed.Dale Rahn
'no problem' pval@
2005-04-06backout -- breaks at least amd64; spotted by marcTheo de Raadt
2005-04-05Do a better job of running destructors in the right order.Dale Rahn
2005-03-23Code reorganization, move copied code in library.c and library_mquery.cDale Rahn
into its own file. no functional change.
2004-10-17Fix some problems related to LD_LIBRARY_PATH parsing where it would notDale Rahn
correctly deal with current directory searches specified by "::", ":foo" or "foo:"
2004-07-05Fix an issue where a shared library could be loaded at two differentKjell Wooding
locations by resolving all dlopens back to a dev/inode. i.e. Don't load a library if the dev/inode it stats back to matches one already in our list. fix started (and ok'ed) drahn@. ok deraadt@. "doesn't break anything yet" pval@ art@ brad@
2003-09-02Fix PR 3371, symbol lookup in dlopen()ed objects is not correct. CorrectDale Rahn
behavior for RTLD_GLOBAL/RTLD_LOCAL is now supported. ok espie@
2003-07-18Fix print if minor of library used is is less than requested. ok tdeval@Dale Rahn
2003-07-06various proto, ansi, and knf repair. tested on all architectures thatTheo de Raadt
use it. (build may require make cleandir because of .depend balony)
2003-07-02Correct library search algorithm, wrt versioned objectsNiklas Hallqvist
2003-06-22Dynamic linking random order fixes. This enables random library ordering.Dale Rahn
Tested by naddy@ and others.
2003-06-09pefo 3/4 licence cleanupsTheo de Raadt
2003-05-30When loading a shared object or libraries dependant object, load themDale Rahn
in random order. This will reduce the possiblity of a buffer overflow being able to predict the addresss of useful code. Can be disabled with the LD_NORANDOM environment variable for debugging purposes. ok deraadt.
2003-02-02knf & ansi; drahn okTheo de Raadt
2003-01-30Change the constructor execution order to initialize dependant librariesDale Rahn
first. This mirrors the commit espie put in a.out ld.so recently.
2002-12-13Compare to ELFMAG byte by byte rather than using full fledged function.Dale Rahn
Also avoids a gas problem for the moment.
2002-11-17Terminate printed strings with newlines.Dale Rahn
2002-08-08There was a possible off-by-one in ld.so when loading shared libraries.Artur Grabowski
In some (rare?) cases, where the bss was too small and fit entirely into the leftovers of the data segment we could map one extra page. This is slightly dangerous on PMAP_PREFER machines where mmaps allocations do not happen linearly in the virtual space and we could end up overwriting mappings that are already in use. This also changes the initial allocation from being a MAP_ANON to a MAP_FILE so that we can pass the fd as a PMAP_PREFER hint.
2002-07-24ok i found itTheo de Raadt
2002-07-24back out broken stuff until it is fixedTheo de Raadt
2002-07-24spacingTheo de Raadt
2002-07-24cope with _dl_mmap() returning void *Theo de Raadt
2002-07-23match _dl_ syscall prototypes w/ the real syscalls prototypes, including ↵Michael Shalayeff
args and return values; art@ ok
2002-07-12Change ld.so search order/method to match the a.out ld.so.Dale Rahn
run destructors on dlclose() Move more symbols into _dl_ private space, so that the proper (libc) version of the function will be used. Add readdir() functionality to perform the proper library searching. Support DL_PRELOAD Do not relocate symbols if ld.so is being traced (and will exit). Misc lint cleanup. ok art@
2002-06-05Get rid of an unnecessary typedef (for future cleanup).Artur Grabowski
2002-05-28more KNFTheo de Raadt
2002-05-24Change _dl_strcpy() to _dl_strlcpy(), implementation taken from libc.Dale Rahn
2002-05-24more KNFTheo de Raadt
2002-05-24various KNFTheo de Raadt
2001-09-22Do not check for ':' twice, otherwise the rpath loses the first characterDale Rahn
after the : in the list of paths.
2001-08-21Fix up comment to indicate order that libraries in which theDale Rahn
libraries are actually searched.
2001-08-06Change the priority of LD_LIBRARY_PATH, -rpath, and ldconfig pathDale Rahn
in ELF ld.so to match the behavior in a.out ld.so. The given order is the new order, previously ldconfig had highest priority, which made it impossible to override.
2001-05-31random indentation fixes (needs much more work).Artur Grabowski
2001-05-11MAP_COPY -> MAP_PRIVATEArtur Grabowski
2001-04-02Cleanup for 64bit support.Dale Rahn
Pieces by art, niklas and me. Only tested on powerpc.