'Performs the actual symbol lookup within one ELF file.'

def _lookup(self, symb):

    leak = self.leak
    Dyn = {32: elf.Elf32_Dyn, 64: elf.Elf64_Dyn}[self.elfclass]
    name = (lambda tag: next((k for (k, v) in ENUM_D_TAG.items() if (v == tag))))
    self.status('.gnu.hash/.hash,    .strtab    and    .symtab    offsets')
    hshtab = self._find_dt(constants.DT_GNU_HASH)
    strtab = self._find_dt(constants.DT_STRTAB)
    symtab = self._find_dt(constants.DT_SYMTAB)
    if hshtab:
        hshtype = 'gnu'
    else:
        hshtab = self._find_dt(constants.DT_HASH)
        hshtype = 'sysv'
    if (not all([strtab, symtab, hshtab])):
        self.failure('Could    not    find    all    tables')
    strtab = self._make_absolute_ptr(strtab)
    symtab = self._make_absolute_ptr(symtab)
    hshtab = self._make_absolute_ptr(hshtab)
    routine = {'sysv': self._resolve_symbol_sysv, 'gnu': self._resolve_symbol_gnu}[hshtype]
    return routine(self.libbase, symb, hshtab, strtab, symtab)
