Skip to content
  • Dimitry Andric's avatar
    [Sanitizers] Get link map on FreeBSD and NetBSD via documented API · 52f2df1e
    Dimitry Andric authored
    Summary:
    Instead of hand-crafting an offset into the structure returned by
    dlopen(3) to get at the link map, use the documented API.  This is
    described in dlinfo(3): by calling it with `RTLD_DI_LINKMAP`, the
    dynamic linker ensures the right address is returned.
    
    This is a recommit of 92e267a9, with
    dlinfo(3) expliclity being referenced only for FreeBSD, non-Android
    Linux, NetBSD and Solaris.  Other OSes will have to add their own
    implementation.
    
    Reviewers: devnexen, emaste, MaskRay, krytarowski
    
    Reviewed By: krytarowski
    
    Subscribers: krytarowski, vitalybuka, #sanitizers, llvm-commits
    
    Tags: #sanitizers, #llvm
    
    Differential Revision: https://reviews.llvm.org/D73990
    52f2df1e
Loading