...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::dll::library_info — 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.
// In header: <boost/dll/library_info.hpp> class library_info : private noncopyable { public: // construct/copy/destruct explicit library_info(const boost::dll::fs::path &, bool = true); // public member functions 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 &); };
library_info
public
construct/copy/destructexplicit library_info(const boost::dll::fs::path & library_path, bool throw_if_not_native_format = true);
Opens file with specified path and prepares for information extraction.
Parameters: |
|
library_info
public member functionsstd::vector< std::string > sections();
Returns: |
List of sections that exist in binary file. |
std::vector< std::string > symbols();
Returns: |
List of all the exportable symbols from all the sections that exist in binary file. |
std::vector< std::string > symbols(const char * section_name);
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Parameters: |
|
||
Returns: |
List of symbols from the specified section. |
std::vector< std::string > symbols(const std::string & section_name);