AsmGrader 0.0.0
Loading...
Searching...
No Matches
elf_reader.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "symbols/symbol.hpp"
5
6#include <elfio/elfio.hpp>
7
8#include <string>
9#include <vector>
10
11namespace asmgrader {
12
15{
16public:
17 explicit ElfReader(const std::string& file_path);
18
19 // Get the names of all sections
20 std::vector<std::string> get_section_names() const;
21
22 std::vector<Symbol> get_symbols() const;
24
25 std::vector<std::string> get_symbol_names() const;
26
27private:
28 ELFIO::elfio elffile_;
29};
30
31} // namespace asmgrader
Adaptor to (a few) libelf functions.
Definition elf_reader.hpp:15
ElfReader(const std::string &file_path)
Definition elf_reader.cpp:27
std::vector< std::string > get_section_names() const
Definition elf_reader.cpp:33
SymbolTable get_symbol_table() const
Definition elf_reader.cpp:110
std::vector< std::string > get_symbol_names() const
std::vector< Symbol > get_symbols() const
Definition elf_reader.cpp:39
A basic symbol table, for simple interaction with a number of symbols loaded from an ELF file.
Definition symbol_table.hpp:14
Definition asm_buffer.hpp:19