aboutsummaryrefslogtreecommitdiff
path: root/lib/librtld_db/rtld_db.c
Commit message (Collapse)AuthorAgeFilesLines
* librtld_db: Handle anonymous mappings below the first file mapping.Mark Johnston2020-06-051-6/+11
| | | | | | | | | | | r360979 erroneously assumed that the lowest mapping in an address space would be a file mapping, but of course this is not true in general. Reported and tested by: Frederic Chardon <chardon.frederic@gmail.com> MFC after: 3 days Notes: svn path=/head/; revision=361844
* librtld_db: Fix shlib mapping offsets.Mark Johnston2020-05-121-8/+22
| | | | | | | | | | | | | | kve_offset gives the offset into the backing file, which is not what we want since different segments may map the same page. Use the base of the mapping to determine the offset exported by librtld_db instead. PR: 244732 Reported by: Jenkins, Nicolò Mazzucato <nicomazz97@gmail.com> MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=360979
* lib: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-261-0/+2
| | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified 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. Notes: svn path=/head/; revision=326219
* Avoid double-closing an fd if elf_begin() fails.Mark Johnston2017-03-221-3/+1
| | | | | | | | | Reported by: Miles Ohlrich <miles.ohlrich@isilon.com> MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=315727
* Fix style bugs and remove trailing whitespace in libproc and librtld_db.Mark Johnston2016-12-061-28/+27
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=309591
* librtld_db: Use the auxv to figure out where to look up loader symbols.Mark Johnston2016-07-301-29/+164
| | | | | | | | | | | | Previously, librtld_db just hardcoded /libexec/ld-elf.so, which isn't correct for processes that aren't using the native ABI. With this change, librtld_db can be used to inspect non-native processes; in particular, dtrace -c now works for 32-bit executables on amd64. MFC after: 1 month Notes: svn path=/head/; revision=303531
* Hook up support for userland CTF support in DTrace. This required someMark Johnston2014-10-031-2/+2
| | | | | | | | | | | | | | | | | | | | | modifications to libproc to support fetching the CTF info for a given file. With this change, dtrace(1) is able to resolve type info for function and USDT probe arguments, and function return values. In particular, the args[n] syntax should now work for referencing arguments of userland probes, provided that the requisite CTF info is available. The uctf tests pass if the test programs are compiled with CTF info. The current infrastructure around the DTrace test suite doesn't support this yet. Differential Revision: https://reviews.freebsd.org/D891 MFC after: 1 month Relnotes: yes Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=272488
* Handle the different event types properly in rd_event_addr(). In particular,Mark Johnston2014-05-081-7/+35
| | | | | | | | | | | with r265456 _r_debug_postinit can be used for RD_POSTINIT events. rtld(1) uses r_debug_state for dl state transitions, so we use its address for RD_DLACTIVITY events. MFC after: 2 weeks Notes: svn path=/head/; revision=265629
* Import the librtld_db library. This is needed by userland DTrace.Rui Paulo2010-07-311-0/+226
This is not yet enabled in the build because I also need to import a new version of libproc. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=210678