Exemple #1
0
std::vector<symbol> read(const ELFObjectFile<ELFT>& obj) {
    int size1 = utils::distance(obj.begin_symbols(),
                                obj.end_symbols());
    int size2 = utils::distance(obj.begin_dynamic_symbols(),
                                obj.end_dynamic_symbols());

    std::vector<symbol> symbols;
    symbols.reserve(size1+size2);

    auto it = read(obj.begin_symbols(),
                   obj.end_symbols(),
                   std::back_inserter(symbols));

    read(obj.begin_dynamic_symbols(),
         obj.end_dynamic_symbols(),
         it);
    return symbols;
}
Exemple #2
0
void symbol_entries(const ELFObjectFile<T> &obj, ogre_doc &s) {
    typedef typename ELFFile<T>::Elf_Shdr sec_hdr;
    auto elf = obj.getELFFile();
    symbol_entries(obj, obj.begin_symbols(), obj.end_symbols(), s);
    symbol_entries(obj, obj.begin_dynamic_symbols(), obj.end_dynamic_symbols(), s);
}