dl_phdr_info * info,
    const Elf & elf,
    const Elf::Section & symbol_table,
    const Elf::Section & string_table,
    std::vector<SymbolIndex::Symbol> & symbols,
    SymbolIndex::Resources & resources)
{
    
    const ElfSym * symbol_table_entry = reinterpret_cast<const ElfSym *>(symbol_table.begin());
    const ElfSym * symbol_table_end = reinterpret_cast<const ElfSym *>(symbol_table.end());
    const char * strings = string_table.begin();
    for (; symbol_table_entry < symbol_table_end; ++symbol_table_entry)
    {
        if (!symbol_table_entry->st_name
            || !symbol_table_entry->st_value
            || strings + symbol_table_entry->st_name >= elf.end())
            continue;
        
        const char * symbol_name = strings + symbol_table_entry->st_name;
        if (!symbol_name)
            continue;
        SymbolIndex::Symbol symbol;
        symbol.address_begin = reinterpret_cast<const void *>(
            info->dlpi_addr + symbol_table_entry->st_value);
        symbol.address_end = reinterpret_cast<const void *>(
            info->dlpi_addr + symbol_table_entry->st_value + symbol_table_entry->st_size);
        symbol.name = symbol_name;