libabigail
Classes | Typedefs | Enumerations | Functions
abigail::elf Namespace Reference

The namespace for the ELF Reader. More...

Classes

class  reader
 This is the interface an ELF reader. More...
 

Typedefs

typedef shared_ptr< elf::readerreader_sptr
 A convenience typedef for a smart pointer to a elf::reader. More...
 

Enumerations

enum  elf_type : unsigned {
  ELF_TYPE_EXEC , ELF_TYPE_PI_EXEC , ELF_TYPE_DSO , ELF_TYPE_RELOCATABLE ,
  ELF_TYPE_UNKNOWN
}
 The kind of ELF file we are looking at. More...
 

Functions

bool get_soname_of_elf_file (const string &path, string &soname)
 Get the SONAME property of a designated ELF file. More...
 
bool get_type_of_elf_file (const string &path, elf::elf_type &type)
 Get the type of a given elf type. More...
 

Detailed Description

The namespace for the ELF Reader.

Typedef Documentation

◆ reader_sptr

typedef shared_ptr<elf::reader> reader_sptr

A convenience typedef for a smart pointer to a elf::reader.

Definition at line 172 of file abg-elf-reader.h.

Enumeration Type Documentation

◆ elf_type

enum elf_type : unsigned

The kind of ELF file we are looking at.

Enumerator
ELF_TYPE_EXEC 

A normal executable binary.

ELF_TYPE_PI_EXEC 

A Position Independant Executable binary.

ELF_TYPE_DSO 

A dynamic shared object, a.k.a shared library binary.

ELF_TYPE_RELOCATABLE 

A relocatalbe binary.

ELF_TYPE_UNKNOWN 

An unknown kind of binary.

Definition at line 33 of file abg-elf-reader.h.

Function Documentation

◆ get_soname_of_elf_file()

bool get_soname_of_elf_file ( const string &  path,
string &  soname 
)

Get the SONAME property of a designated ELF file.

Parameters
paththe path to the ELF file to consider.
sonameoutput parameter. This is set to the SONAME of the file located at path, iff this function return true.
Returns
true iff the SONAME property was found in the ELF file located at path and set into the argument of the parameter soname.

Definition at line 1025 of file abg-elf-reader.cc.

◆ get_type_of_elf_file()

bool get_type_of_elf_file ( const string &  path,
elf::elf_type type 
)

Get the type of a given elf type.

Parameters
paththe absolute path to the ELF file to analyzed.
typethe kind of the ELF file designated by path.
outparameter. Is set to the type of ELF file of path. This parameter is set iff the function returns true.
Returns
true iff the file could be opened and analyzed.

Definition at line 1067 of file abg-elf-reader.cc.