elf_readert Class Reference

#include <elf_reader.h>

+ Collaboration diagram for elf_readert:

Public Types

enum  elf_classt { ELF32 =1, ELF64 =2 }
typedef std::vector< Elf32_Shdrelf32_section_header_tablet
typedef std::vector< Elf64_Shdrelf64_section_header_tablet

Public Member Functions

 elf_readert (std::istream &_in)
std::string get_string (std::streampos index) const
std::string elf32_section_name (std::size_t index) const
std::string elf64_section_name (std::size_t index) const
std::string section_name (std::size_t index) const
std::streampos section_offset (std::size_t index) const
bool has_section (const std::string &name) const

Public Attributes

elf_classt elf_class
Elf32_Ehdr elf32_header
Elf64_Ehdr elf64_header
bool little_endian
elf32_section_header_tablet elf32_section_header_table
elf64_section_header_tablet elf64_section_header_table
std::streampos string_table_offset
std::size_t number_of_sections

Protected Attributes

std::istream & in

Detailed Description

Definition at line 100 of file elf_reader.h.

Member Typedef Documentation

◆ elf32_section_header_tablet

Definition at line 115 of file elf_reader.h.

◆ elf64_section_header_tablet

Definition at line 118 of file elf_reader.h.

Member Enumeration Documentation

◆ elf_classt


Definition at line 105 of file elf_reader.h.

Constructor & Destructor Documentation

◆ elf_readert()

elf_readert::elf_readert ( std::istream &  _in)

Definition at line 17 of file elf_reader.cpp.

Member Function Documentation

◆ elf32_section_name()

std::string elf_readert::elf32_section_name ( std::size_t  index) const

Definition at line 125 of file elf_reader.h.

◆ elf64_section_name()

std::string elf_readert::elf64_section_name ( std::size_t  index) const

Definition at line 130 of file elf_reader.h.

◆ get_string()

std::string elf_readert::get_string ( std::streampos  index) const

Definition at line 125 of file elf_reader.cpp.

◆ has_section()

bool elf_readert::has_section ( const std::string &  name) const

Definition at line 143 of file elf_reader.cpp.

◆ section_name()

std::string elf_readert::section_name ( std::size_t  index) const

Definition at line 137 of file elf_reader.h.

◆ section_offset()

std::streampos elf_readert::section_offset ( std::size_t  index) const

Definition at line 144 of file elf_reader.h.

Member Data Documentation

◆ elf32_header

Elf32_Ehdr elf_readert::elf32_header

Definition at line 109 of file elf_reader.h.

◆ elf32_section_header_table

elf32_section_header_tablet elf_readert::elf32_section_header_table

Definition at line 116 of file elf_reader.h.

◆ elf64_header

Elf64_Ehdr elf_readert::elf64_header

Definition at line 110 of file elf_reader.h.

◆ elf64_section_header_table

elf64_section_header_tablet elf_readert::elf64_section_header_table

Definition at line 119 of file elf_reader.h.

◆ elf_class

elf_classt elf_readert::elf_class

Definition at line 106 of file elf_reader.h.

◆ in

std::istream& elf_readert::in

Definition at line 154 of file elf_reader.h.

◆ little_endian

bool elf_readert::little_endian

Definition at line 112 of file elf_reader.h.

◆ number_of_sections

std::size_t elf_readert::number_of_sections

Definition at line 135 of file elf_reader.h.

◆ string_table_offset

std::streampos elf_readert::string_table_offset

Definition at line 122 of file elf_reader.h.

The documentation for this class was generated from the following files: