'Uses an ELF file to assist in finding the link_map.'

def _find_linkmap_assisted(self, path):

    if isinstance(path, ELF):
        path = path.path
    with context.local(log_level='error'):
        elf = ELF(path)
    elf.address = self.libbase
    w = self.waitfor(('Loading    from    %r' % elf.path))
    real_leak = self.leak
    @MemLeak
    def fake_leak(address):
        try:
            return elf.read(address, 4)
        except ValueError:
            return real_leak.b(address)
    self.leak = fake_leak
    w.status('Searching    for    DT_PLTGOT')
    pltgot = self._find_dt(constants.DT_PLTGOT)
    w.status('Searching    for    DT_DEBUG')
    debug = self._find_dt(constants.DT_DEBUG)
    self.leak = real_leak
    self._find_linkmap(pltgot, debug)
    self.success('Done')
