summaryrefslogtreecommitdiff
path: root/libexec/ld.elf_so/rtld.c
AgeCommit message (Collapse)Author
2014-01-31Catch up with _lwp_park change.joerg
2013-11-20If dlopen of the dynamic linker is requested, e.g. by rump inskrll
rumpuser_dl_bootstrap, then return &_rtld_objself as the handle and do not create a duplicate mapping. The handle is mostly useless as _rtld_objself doesn't appear on _rtld_objlist. This fixes a problem on earm platforms where ld.elf_so (currently) has an init_array section. Calling this caused binaries to segv.
2013-10-19fix unused variable warningschristos
2013-05-09Remove redundant assignment. Hasn't been needed since 1999.skrll
2013-05-09remove stray debuggingchristos
2013-05-09convert to SIMPLEQ like the rest of the queues.christos
2013-05-06Fixed handling of DT_SONAME:christos
- add function to add name aliases for shared libraries loaded XXX[1]: we don't add a name during load time, only when DT_SONAME is present. - search already loaded objects in load_by_name for an already loaded object that matches our name and return it. - add missing initialization and cleanup for obj->names XXX[2]: should we make them SIMPLEQ? - Add XXX in rtld.c about getting the name of an object. NB: This makes the jdk work again without resorting to a hack of putting the build path of libjvm.so into the run path (which is a security problem). XXX: Pullup-6?
2013-05-06Trailing whitespaceskrll
2013-05-06Disalble a debug only where it causes problems.skrll
2013-05-03Remove dbg for _ctype_matt
2013-05-02Print out &_DYNAMIC too.matt
2012-12-16Fix the other lwp_park() to pass 0 for the 'unpark' lwp.dsl
2012-12-16You need to pass 0 (not -1) to lwp_park() if you don't alsodsl
want to do an unpark. Clearly this code path was never tested! Needs pullup to netbsd-6
2012-10-01On failure in _rtld_dlcheck, call _rtld_error, not xwarnx.riastradh
Callers need not call _rtld_error themselves now. Fixes PR lib/41760. Should add the test case from the PR too.
2012-08-15Add .init_array/.fini_array support (conditionalized on HAVE_INITFINI_ARRAY).matt
2012-03-13Mark _rtld_debug_state as not to be inlined. Add an explicit instructionjoerg
barrier to prevent removal of calls to it.
2012-02-16Add _dlauxinfo helper function to provide access to the ELF auxilaryjoerg
vector. This can normally be found via __ps_strings, but libc is initialised too early when linked dynamically and doesn't have access to it yet, so provide an alternative mechanism via ld.elf_so. Bump libc minor.
2011-11-25Unbreak RTLD_NEXT and co on platforms that don't inline or tail calljoerg
do_dlsym.
2011-11-17FreeBSD bug report 161344: TLS area for the main thread is set up tojoerg
early, if e.g. pointers to functions are used as initializers.
2011-10-23Don't block SIGTRAP so that on architectures where the debugger needs tochristos
be able to receive sigtrap for breakpoints to work, it can. For example we are setting breakpoints inside dlopen(), after we've blocked the signal, so the process keep trapping and looping over the trap instruction without being able to send the signal. Another way would be to move the _rtld_debug_state() calls outside the critical section...
2011-08-13disable debugging that makes us core dumpchristos
2011-06-25PR/45015: ld.elf_so: support ELF symbol versioningnonaka
Applied latest patch.
2011-04-02Revert pthread_atfork related change not intended for commit yet.joerg
2011-04-02Unbreak HPPAjoerg
2011-03-29Block signals when using the exclusive lock.joerg
2011-03-28Refine locking scheme around init/fini to not hold the exclusive lock.joerg
Use a simple generation count instead and restart looking for work if it changed (e.g. due to an dlopen call from an init function). Leave the possible dlclose() race for now.
2011-03-27exit, not enterjoerg
2011-03-27Handle _rtld_exit as full entry point since other threads may still bejoerg
running at the time.
2011-03-27Add some debug messages for explicit rtld entry pointsjoerg
2011-03-27Locking around dlclose()joerg
2011-03-26Fix merge error that broke HPPAjoerg
2011-03-25Add basic locking to ld.elf_so.joerg
2011-03-13Fill in TLS related fields in dl_iterate_phdr if TLS is supportedjoerg
2011-03-09Add TLS support infrastructure. For dynamic binaries, ld.elf_so exportsjoerg
_rtld_tls_allocate and _rtld_tls_free. libpthread uses this functions to setup the thread private area of all new threads. ld.elf_so is responsible for setting up the private area for the initial thread. Similar functions are called from _libc_init for static binaries, using dl_iterate_phdr to access the ELF Program Header. Add test cases to exercise the different TLS storage models. Test cases are compiled and installed on all platforms, but are skipped on platforms not marked for TLS support. This material is based upon work partially supported by The NetBSD Foundation under a contract with Joerg Sonnenberger. It is inspired by the TLS support in FreeBSD by Doug Rabson and the clean ups of the DragonFly port of the original FreeBSD modifications.
2011-02-24make DEBUG compile without RTLD_DEBUGpooka
2010-12-24Add support for DF_1_BIND_NOW, DF_1_NODELETE and DF_1_NOOPEN markedskrll
objects, and the RTLD_NODELETE and RTLD_NOLOAD flags to dlopen(3). Mark libpthread as DF_1_NOOPEN and use it to test the functionality. Somewhat taken from FreeBSD. Fixes PR 42029. OK from christos and joerg.
2010-12-19Sprinkle some KNF.skrll
2010-12-19Remove unnecessary #ifdef RTLD_DEBUGskrll
2010-12-16Don't use normal environment handling functions from libc, but iteratejoerg
once over the array and clean out entries as needed.
2010-12-16s/rdbg/dbg/ in a few places.skrll
2010-10-29PR/44010: YAMAMOTO Takashi: sbrk: grow 0xb3ba2000 failed, error = 12"christos
(due to setenv changes?) Provide a mini unsetenv that does not allocate/free memory and does not bother about locking.
2010-10-16Implement dl_iterate_phdr.skrll
Somewhat taken from FreeBSD. Manual page from OpenBSD.
2010-03-18Use alloca(3) instead of local xmalloc for creating our DoneLists.roy
This allows threaded programs to use us a little better, PR lib/43005. We need to disable SSP when using alloca.
2010-02-27Implement negative cache checks for symbol lookups.roy
Uses the Donelist idea from FreeBSD.
2010-01-10Fixup comment.skrll
2009-12-02If the environment is corrupt, die. From FreeBSD.christos
2009-11-17Make _rtld_pagesz of type size_t.skrll
Fixes round_down for alpha which made ldd(1) break.
2009-09-24Add Solarisa-like dlinfo() interface to the ELF dynamic linker.pooka
Implement RTLD_DI_LINKMAP which returns a pointer to the linkmap chain at the given object. Other Solaris queries are currently unimplemented.
2009-05-19warns=4christos
2008-10-26if LD32DIR is defined:mrg
- look in src/compat/lib/libc for libc_pic. - define RTLD_ARCH_SUBDIR to "i386" or "sparc" for amd64 and sparc64 builds, respectively if RTLD_ARCH_SUBDIR is defined, add this path before RTLD_DEFAULT_LIBRARY_PATH in the default search path.