'Internal Documentation:
See the ELF manual for more information.  Search for the phrase
"A hash table of Elf32_Word objects supports symbol table access", or see:
https://docs.oracle.com/cd/E19504-01/802-6319/6ia12qkfo/index.html#chapter6-48031
struct Elf_Hash {
uint32_t nbucket;
uint32_t nchain;
uint32_t bucket[nbucket];
uint32_t chain[nchain];
You can force an ELF to use this type of symbol table by compiling
with \'gcc -Wl,--hash-style=sysv\''

def _resolve_symbol_sysv(self, libbase, symb, hshtab, strtab, symtab):

    self.status('.hash    parms')
    leak = self.leak
    Sym = {32: elf.Elf32_Sym, 64: elf.Elf64_Sym}[self.elfclass]
    nbucket = leak.field(hshtab, elf.Elf_HashTable.nbucket)
    bucketaddr = (hshtab + sizeof(elf.Elf_HashTable))
    chain = (bucketaddr + (nbucket * 4))
    self.status('hashmap')
    hsh = (sysv_hash(symb) % nbucket)
    idx = leak.d(bucketaddr, hsh)
    while (idx != constants.STN_UNDEF):
        sym = (symtab + (idx * sizeof(Sym)))
        symtype = (leak.field(sym, Sym.st_info) & 15)
        if (symtype == constants.STT_FUNC):
            name = leak.s((strtab + leak.field(sym, Sym.st_name)))
            if (name == symb):
                addr = (libbase + leak.field(sym, Sym.st_value))
                return addr
            self.status(('%s    (hash    collision)' % name))
        idx = leak.d(chain, idx)
    else:
        self.failure(('Could    not    find    a    SYSV    hash    that    matched    %#x' % hsh))
        return None
