def addr_deref(elf, addr):
    for section in elf.iter_sections():
        start = section['sh_addr']
        end = (start + section['sh_size'])
        if (start <= addr < end):
            data = section.data()
            offset = (addr - start)
            return unpack_pointer(elf, data, offset)
    return 0
def addr_deref(elf, addr):
    for section in elf.iter_sections():
        start = section['sh_addr']
        end = (start + section['sh_size'])
        if (start <= addr < end):
            data = section.data()
            offset = (addr - start)
            return unpack_pointer(elf, data, offset)
    return 0