summaryrefslogtreecommitdiff
path: root/libexec/ld.so/dlfcn.c
AgeCommit message (Collapse)Author
2006-05-03Keep the state of the debugger constistant, let it know a the dynamicDale Rahn
linker is adding or removing a library before it does the act. Discussed with kurt@ some time ago.
2005-11-09the handle returned by dlopen(0,...) should behave the same asKurt Miller
RTLD_DEFAULT, so return RTLD_DEFAULT for handle. ok drahn@
2005-10-18This is too useful for debugging to not have in the tree, howeverDale Rahn
the interface may change at any time, so dont depend on it. (ie regress)
2005-10-16Consolidate dl_boot and dlopen dep lib loading into new functionKurt Miller
_dl_load_dep_libs. Now both dl_boot and dlopen will randomize dep lib loading, where previously only dl_boot did.
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-10set _dl_loading_object to NULL upon entering and exiting _dl_boot andKurt Miller
dlopen and cleanup of related redundant code. looks fine drahn@
2005-10-09introduce object ref count macros (suggested by dale). no functionalKurt Miller
change.
2005-10-07rename dload_list to grpsym_list which better represents its usage.Kurt Miller
2005-10-06remove dep_next "shadow object" dead code.Kurt Miller
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-05move opencount increment and dups check to _dl_link_dlopen. fixes cleanupKurt Miller
of partially dlopened (but failed) cleanup.
2005-10-03check opencount after handle has been verified to avoid a possible useKurt Miller
after free.
2005-10-03protect against errant programs that attempt to dlclose a handle that isKurt Miller
already closed (but still around due to refs).
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-28keep a state flag if a library has been unloaded, and then free the listDale Rahn
seperately ok kurt@
2005-09-28keep track of opencounts for dlopened objects, so that theyDale Rahn
get unloaded the right number of times on exit.
2005-09-28use the calling object's handle for dlsym(RTLD_DEFAULT,...). makes symbolsKurt Miller
in the calling object's load group visable.
2005-09-22Track if symbols are searched but missing while resolving GOT, ifDale Rahn
any are missing exit instead of later causing an abort, ok kurt@
2005-09-21Fix bug if object search is not the object where dlsym() finds an object.Dale Rahn
2005-09-19don't promote DT_NEEDED libs to RTLD_GLOBAL by default when dlopeningKurt Miller
libs. okay drahn@
2005-09-17Cleanly handle the case where a dynamic object is opened, but one of it'sDale Rahn
dependant libraries is missing. return NULL for a handle instead of causing the program to exit.
2005-09-16Rework symbol lookup to more closely match sun's documentation, nowDale Rahn
treats dlopens as load groups. ok kurt@
2005-09-13Only return a _dl_md_plabel() if the object is a function, do not indirectDale Rahn
a data reference. sigh.
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-08Do not shadow a parameter with a local variable. also add a debug statementDale Rahn
to print dependandant libraries loaded by dlopen ok kurt@
2005-03-07Fix bug not calling callback for the main executable object.Mark Kettenis
ok drahn@, espie@
2004-12-01fix dlsym(RTLD_NEXT,...) when called from the last shared objectKurt Miller
loaded. ok drahn@
2004-10-14Add dl_iterate_phdr() support.Mark Kettenis
ok drahn@, millert@
2004-08-13Cast to Elf_Addr to remove warnings of ELF types(int)/pointer, ok david@Dale Rahn
2004-08-11add dladdr() support and add some 'standard' dlsym() support.Dale Rahn
ok millert miod pval, grumble deraadt
2004-06-07fixup the dlsym() return to produce a callable address (plabel) and move one ↵Michael Shalayeff
comment closer to the code it talks about earlier; drahn@ ok
2004-06-07debugging notify that dlopen() has finished as it was said when it had ↵Michael Shalayeff
started; drahn@ ok
2004-05-25return object* the symbol is in for _dl_find_symbol*; drahn@ okMichael Shalayeff
2004-05-25spacingTheo de Raadt
2004-05-22Dont print symcache statistics if no symbol lookups have occurred, ok mickey@Dale Rahn
2003-10-01Add break statements in switch missing from revision 1.32.Todd C. Miller
2003-09-25dlerror(3) should clear _dl_errno; based on a patch from Bjorn Sandell.Todd C. Miller
Closes PR 3441; drahn@ OK
2003-09-04Symbol cache for GOT lookup. When a symbol is found it is saved in a cacheDale Rahn
for future lookups in the same GOT relocation table. Uses static buffer for small symbol tables, mmap for larger ones. ok deraadt@
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-06-26simple protosTheo de Raadt
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-04-28thread safe dlxxx func (for elf) part 2. This requires the latestMarco S Hyman
ldfcn.h in /usr/include. "looks nice" tedu@
2003-02-02knf & ansi; drahn okTheo de Raadt
2002-11-23Remove some error messages which were incorrectly printed. Some cleanup.Dale Rahn
ok pvalchev@