| Home | Libraries | People | FAQ | More

## Class library_info

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.

## Synopsis

    // 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 &);
    };

## Description

### `library_info` public construct/copy/destruct

1.     explicit 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_path` | Path to the binary file from which the info must be extracted.
   `throw_if_not_native_format` | Throw an exception if this file format is not supported by OS.

### `library_info` public member functions

1.     std::vector< std::string > sections();

   Returns: | List of sections that exist in binary file.

2.     std::vector< std::string > symbols();

   Returns: | List of all the exportable symbols from all the sections that exist in binary file.

3.     std::vector< std::string > symbols(const char * section_name);

   Parameters: |
   `section_name` | Name of the section from which symbol names must be returned.
   Returns: | List of symbols from the specified section.

4.     std::vector< std::string > symbols(const std::string & section_name);

   This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.