summaryrefslogtreecommitdiffstats
path: root/libexec/rtld-elf/debug.c
Commit message (Collapse)AuthorAgeFilesLines
* Do not call callbacks for dl_iterate_phdr(3) with the rtld bind andkib2016-01-201-1/+2
| | | | | | | | | | | | | | | | | | phdr locks locked. This allows to call rtld services from the callback, which is only reasonable for dlopen(path, RTLD_NOLOAD) to test existence of the library in the image, and for dlsym(). The later might still be not quite safe, due to the lazy resolution of filters. To allow dropping the locks around iteration in dl_iterate_phdr(3), we insert markers to track current position between relocks. The global objects list is converted to tailq and all iterators skip markers, globallist_next() and globallist_curr() helpers are added. Reported and tested by: davide Reviewed by: kan Sponsored by: The FreeBSD Foundation MFC after: 3 weeks
* Rtld links with the specially built pic static libc library to get somekib2011-08-241-12/+12
| | | | | | | | | | | | | | | | | C runtime services, like printf(). Unfortunately, the multithread-safeness measures in the libc do not work in rtld environment. Rip the kernel printf() implementation and use it in the rtld instead of libc version. This printf does not require any shared global data and thus is mt-safe. Systematically use rtld_printf() and related functions, remove the calls to err(3). Note that stdio is still pulled from libc due to libmap implementaion using fopen(). This is safe but unoptimal, and can be changed later. Reported and tested by: pgj Diagnosed and reviewed by: kan (previous version) Approved by: re (bz)
* Fix warnings on 64 bit platforms.mdodd2003-06-191-9/+9
| | | | Noticed by: jake
* Provide a mechanism for dumping relocation information.mdodd2003-06-191-0/+91
| | | | | | | Setting the LD_DUMP_REL_PRE or LD_DUMP_REL_POST environment variables cause rtld-elf to output a table of all relocations. This is useful for debugging.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Import the ELF dynamic linker. This is the ElfKit version withjdp1998-03-071-0/+52
quite a few enhancements and bug fixes. There are still some known deficiencies, but it should be adequate to get us started with ELF. Submitted by: John Polstra <jdp@polstra.com>
OpenPOWER on IntegriCloud