summaryrefslogtreecommitdiff
path: root/libexec/ld.so/resolve.c
AgeCommit message (Collapse)Author
2008-05-05Constantly fill in the program header pointer and count in elf_object_tKurt Miller
for all objects which simplifies phdr usage in a few places. "go for it" drahn@
2008-04-09Improve support for shared libs linked at non-zero addreses:Kurt Miller
- rename private values in struct elf_object to better describe their meaning: s/load_offs/obj_base/ "object's address '0' base" s/load_addr/load_base/ "The base address of the loadable segments" - gdb needs the obj_base value so swap positions with load_base in struct elf_object - fix a few occurrences of where load_base was used instead of obj_base. With help and okay drahn@
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-21using _dl_link_grpsym to increment refcounts made _dl_notify_unload_shlibKurt Miller
simpler, however it broke ldd refcount output. use _dl_link_child to increment refcounts and adjust _dl_notify_unload_shlib to match. work by drahn@ and myself. ok drahn@
2005-10-17Fix possible buffer overflow caused by unknown tags in the rangeMark Kettenis
[DT_LOPROC, DT_HIPROC]. ok kurt@
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-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-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-22knf; ok drahnTheo de Raadt
2005-09-22Use std missing symbol print instead of MD custom, do not warn on weakDale Rahn
undefined symbols, or count them as failures. inspired kurt@
2005-09-21Simplify the internal symbol finding API, with some cleanup, prep forDale Rahn
next step. ok kurt@
2005-09-19stop searching after first matching symbol is found. okay drahn@Kurt Miller
2005-09-19simplify code by putting executable in misnamed _dlopened_child_list,Dale Rahn
also move RTLD_NEXT/RTLD_SELF code into that code, it is a single test. okay kurt@
2005-09-16Now that the bug requiring it has been fixed, remove the lastchance kludgeDale Rahn
ok kurt@
2005-09-16Rework symbol lookup to more closely match sun's documentation, nowDale Rahn
treats dlopens as load groups. ok kurt@
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
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@
2004-05-25return object* the symbol is in for _dl_find_symbol*; drahn@ okMichael Shalayeff
2004-05-25spacingTheo de Raadt
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-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-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-11-23Remove some error messages which were incorrectly printed. Some cleanup.Dale Rahn
ok pvalchev@
2002-11-14Make error messages on symbol lookup failures more useful.Dale Rahn
2002-08-23Change arguments to _dl_find_symbol() myself, warnnotfound, and inplt intoDale Rahn
a single flags field with bits representing each. Use defines to create the appropriate masks. Add a new argument sym_size to warn about symbols which have the incorrect size. This replaces 'ifdef notyet' code which was in several of the md files with a single version. sym_size == 0 means do not check, and symbols of type FUNC are not checked.
2002-08-11Fix for Elfbug, the Xtiherit problem which has been seen on most OpenBSDDale Rahn
ELF dynamic systems. This was due to an oddity in ELF where the address of fuctions refer to the PLT address in the program, rather than the actual function address.
2002-07-07typos/grammar/better wordsJan-Uwe Finck
in comments.
2002-05-28more KNFTheo de Raadt
2002-05-24more KNFTheo de Raadt
2002-05-24various KNFTheo de Raadt
2002-03-17Keep _dl_last_object in sync with reality if last element in list is deleted.Dale Rahn
allocated memory is not necessarily 0ed, make sure next pointer is inited.
2002-02-21cleanup of MD/MI ld.so (elf), most changes by art@ cleanup by me.Dale Rahn
tested on alpha sparc64 powerpc.
2001-09-25Cleaner hash bucket init and some KNF.Artur Grabowski
2001-06-08styleArtur Grabowski
2001-05-31unsigned long, not u_int32_tArtur Grabowski
2001-04-02Cleanup for 64bit support.Dale Rahn
Pieces by art, niklas and me. Only tested on powerpc.
2000-06-13Initial import of ELF ld.so. This was written indepently of the gnu rtldDale S. Rahn
code and is fully BSD copyrighted. This initial import contains a mostly working mips and partially working powerpc version. No support for ld.so.hints or system run path exists.