tfel
Loading...
Searching...
No Matches
tfel::system::LibraryInformation Struct Reference

class that is capable of extracting different information from a library or binary file. Currently understands ELF, MACH-O and PE formats on all the platforms. More...

#include </home/runner/work/tfel/tfel/include/TFEL/System/LibraryInformation.hxx>

Public Member Functions

 LibraryInformation (const std::string &, const bool=true)
 opens file with specified path and prepares for information extraction.
 LibraryInformation (const LibraryInformation &)
 copy constructor
 LibraryInformation (LibraryInformation &&) noexcept
 move constructor
LibraryInformation & operator= (const LibraryInformation &)
 standard assignement
LibraryInformation & operator= (LibraryInformation &&) noexcept
 move constructor
std::vector< std::string > sections ()
std::vector< std::string > symbols ()
std::vector< std::string > symbols (const char *)
std::vector< std::string > symbols (const std::string &)
 ~LibraryInformation () noexcept
 destructor

Detailed Description

class that is capable of extracting different information from a library or binary file. Currently understands ELF, MACH-O and PE formats on all the platforms.

Note
this class has been extracted from the boost/dll library version 1.63 and has been originally written by Antony Polukhin, Renato Tegon Forti and Antony Polukhin.

Constructor & Destructor Documentation

◆ LibraryInformation()

tfel::system::LibraryInformation::LibraryInformation ( const std::string & ,
const bool = true )
explicit

opens file with specified path and prepares for information extraction.

Parameters
[in]fpath to the binary file from which the info must be extracted.
[in]bthrow an exception if this file format is not supported by OS.

Member Function Documentation

◆ sections()

std::vector< std::string > tfel::system::LibraryInformation::sections ( )
Returns
List of sections that exist in binary file.

◆ symbols() [1/3]

std::vector< std::string > tfel::system::LibraryInformation::symbols ( )
Returns
List of all the exportable symbols from all the sections that exist in binary file.

◆ symbols() [2/3]

std::vector< std::string > tfel::system::LibraryInformation::symbols ( const char * )
Parameters
[in]nname of the section from which symbol names must be returned.
Returns
The list of symbols from the specified section.

◆ symbols() [3/3]

std::vector< std::string > tfel::system::LibraryInformation::symbols ( const std::string & )
Parameters
[in]nname of the section from which symbol names must be returned.
Returns
The list of symbols from the specified section.

The documentation for this struct was generated from the following file: