summaryrefslogtreecommitdiff
path: root/libexec/ld.so/resolve.h
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@
2007-11-27Make _dl_md_reloc_got() report errors, and take them into account.Miod Vallat
Fixes PR #5579.
2007-05-05Provide hook so that rthreads can provide a spinlock to protect from racesDale Rahn
in lazy binding. ok art@, kurt@
2007-04-03add support for LD_TRACE_LOADED_OBJECTS_{FMT1/FMT2/PROGNAME}. FunctionalityJason Wright
matches and expands on the old a.out ld.so formatting. ok drahn
2006-06-16Add comment warning not to rename _dl_bind, since gdb(1) knows about it.Mark Kettenis
ok (quite a while ago) 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-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-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-09-28keep a state flag if a library has been unloaded, and then free the listDale Rahn
seperately ok kurt@
2005-09-28remove _dl_exiting dead codeKurt Miller
2005-09-28keep track of opencounts for dlopened objects, so that theyDale Rahn
get unloaded the right number of times on exit.
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-21Simplify the internal symbol finding API, with some cleanup, prep forDale Rahn
next step. ok kurt@
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-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-08-11add dladdr() support and add some 'standard' dlsym() support.Dale Rahn
ok millert miod pval, grumble deraadt
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
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-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-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-17mquery support, currently for i386 only.Dale Rahn
2003-02-15Paranoia about mprotect, mprotect page aligned regions for got and plt.Dale Rahn
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-18Prepare for an upcoming ELF executable change. This will allow ld.so toDale Rahn
protect the GOT and PLT sections of the executable from being overwritten. This behavior is enabled by changes in the executable/shared object layout, and does not occur without the ld changes.
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-24ok i found itTheo de Raadt
2002-07-24back out broken stuff until it is fixedTheo de Raadt
2002-07-24make more _dl_*() func params like real ones in libcTheo de Raadt
2002-06-07move load_offs out of the link_map area.Artur Grabowski
2002-06-05Get rid of an unnecessary typedef (for future cleanup).Artur Grabowski
2002-05-24more KNFTheo de Raadt
2002-05-24various KNFTheo de Raadt
2002-03-17Clean up the zapping of bad variables. Instead of implementingArtur Grabowski
_dl_suid_ok, just use the issetugid syscall. ok drahn@.