summaryrefslogtreecommitdiff
path: root/libexec/ld.so/loader.c
AgeCommit message (Collapse)Author
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
2007-04-02Since the kernel allows argv[0] == NULL, dont core in ld.soDale Rahn
diff from Matthew Dempsky, with reminder from theo.
2007-01-28revert 1.108, the diff allowed ldd to print the load address of the binary,Dale Rahn
however this modified variables used by C++ backtrace code which caused it to crash. ok kettenis
2006-11-21Fill in load/end address for binary.Dale Rahn
2006-11-15failed to purge doubled up environment variables; found by Mark DowdTheo de Raadt
ok miod
2006-11-10Getting much closer.Dale Rahn
2006-11-10Not quite working ld.so support for shDale Rahn
2006-09-24Fill in the list of loaded segments for the main executable such that we canMark Kettenis
unprotect them if necessary for binaries that have TEXTREL set. ok drahn@, martin@
2006-05-08more spacingTheo de Raadt
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-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-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-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-09-28remove _dl_exiting dead codeKurt Miller
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-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-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-08-11revert, should not have gone inPer Fogelstrom
2004-08-11mips->mips64Per Fogelstrom
2004-05-27fake plabel32 relocs for dyn.init/fini instead of an evil md macro hookMichael Shalayeff
2004-05-26call ctors after debugging has been setup; drahn@ okMichael Shalayeff
2004-05-25md parts for hppaMichael Shalayeff
2004-05-25use md hook for calling init/fini if defined; only say running ctors/dtors ↵Michael Shalayeff
if they are there; drahn@ ok
2004-05-25return object* the symbol is in for _dl_find_symbol*; drahn@ okMichael Shalayeff
2004-05-25spacingTheo de Raadt
2004-05-24doing ldd exit asap -- move all other tasks towards after it.Michael Shalayeff
call atext(_dl_dtors) at the very end -- allows debuggering it. drahn@ ok
2004-05-24Change define used to deal with PLT protection, use postive logic not negative.Dale Rahn
ok mickey@
2004-02-23Set the user variable environ early in ld.so so that library constructors canDale Rahn
properly see the environment. Fixes problem with MALLOC_OPTIONS on dynamic executables. ok deraadt@
2004-02-10Check for RTLD_TEXT_PLT define instead of an architecture specific check.Dale Rahn
2004-02-07Dynamic linker support for arm. non-lazy binding works.Dale Rahn
2003-10-04breaks on sparcTheo de Raadt
2003-10-03Initialize environ before calling constructors or atexit.Dale Rahn
Tested by tedu, no real 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-07-09changes to ld.so to be compatible with newer binutils, requiresDale Rahn
slight changes in the startup code on most archs. ok art@ brad@
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-06-03Disable random library ordering, this seems to be exposing bugs in other code.Dale Rahn