cprover
elf_readert Class Reference

#include <elf_reader.h>

Collaboration diagram for elf_readert:
[legend]

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 (unsigned index) const
 
std::string elf64_section_name (unsigned index) const
 
std::string section_name (unsigned index) const
 
std::streampos section_offset (unsigned 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
 
unsigned 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

Enumerator
ELF32 
ELF64 

Definition at line 105 of file elf_reader.h.

Constructor & Destructor Documentation

§ elf_readert()

Member Function Documentation

§ elf32_section_name()

std::string elf_readert::elf32_section_name ( unsigned  index) const
inline

Definition at line 125 of file elf_reader.h.

References get_string().

Referenced by section_name().

§ elf64_section_name()

std::string elf_readert::elf64_section_name ( unsigned  index) const
inline

Definition at line 130 of file elf_reader.h.

References get_string().

Referenced by section_name().

§ get_string()

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

Definition at line 124 of file elf_reader.cpp.

References in, and string_table_offset.

Referenced by elf32_section_name(), and elf64_section_name().

§ has_section()

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

Definition at line 142 of file elf_reader.cpp.

References number_of_sections, and section_name().

Referenced by is_goto_binary(), and section_offset().

§ section_name()

std::string elf_readert::section_name ( unsigned  index) const
inline

Definition at line 137 of file elf_reader.h.

References ELF32, elf32_section_name(), and elf64_section_name().

Referenced by has_section(), and read_goto_binary().

§ section_offset()

std::streampos elf_readert::section_offset ( unsigned  index) const
inline

Definition at line 144 of file elf_reader.h.

References ELF32, and has_section().

Referenced by elf_readert(), and read_goto_binary().

Member Data Documentation

§ elf32_header

Elf32_Ehdr elf_readert::elf32_header

Definition at line 109 of file elf_reader.h.

Referenced by elf_readert().

§ elf32_section_header_table

elf32_section_header_tablet elf_readert::elf32_section_header_table

Definition at line 116 of file elf_reader.h.

Referenced by elf_readert().

§ elf64_header

Elf64_Ehdr elf_readert::elf64_header

Definition at line 110 of file elf_reader.h.

Referenced by elf_readert().

§ elf64_section_header_table

elf64_section_header_tablet elf_readert::elf64_section_header_table

Definition at line 119 of file elf_reader.h.

Referenced by elf_readert().

§ elf_class

elf_classt elf_readert::elf_class

Definition at line 106 of file elf_reader.h.

Referenced by elf_readert().

§ in

std::istream& elf_readert::in
protected

Definition at line 154 of file elf_reader.h.

Referenced by elf_readert(), and get_string().

§ little_endian

bool elf_readert::little_endian

Definition at line 112 of file elf_reader.h.

Referenced by elf_readert().

§ number_of_sections

unsigned elf_readert::number_of_sections

Definition at line 135 of file elf_reader.h.

Referenced by elf_readert(), has_section(), and read_goto_binary().

§ string_table_offset

std::streampos elf_readert::string_table_offset

Definition at line 122 of file elf_reader.h.

Referenced by elf_readert(), and get_string().


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