summaryrefslogtreecommitdiff
path: root/libexec/rtld-elf/debug.c
Commit message (Collapse)AuthorAgeFilesLines
* libexec: adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326274
* Do not call callbacks for dl_iterate_phdr(3) with the rtld bind andKonstantin Belousov2016-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 Notes: svn path=/head/; revision=294373
* Rtld links with the specially built pic static libc library to get someKonstantin Belousov2011-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) Notes: svn path=/head/; revision=225152
* Fix warnings on 64 bit platforms.Matthew N. Dodd2003-06-191-9/+9
| | | | | | | Noticed by: jake Notes: svn path=/head/; revision=116582
* Provide a mechanism for dumping relocation information.Matthew N. Dodd2003-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. Notes: svn path=/head/; revision=116563
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Import the ELF dynamic linker. This is the ElfKit version withJohn Polstra1998-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> Notes: svn path=/cvs2svn/branches/JDP/; revision=34192