LIEF: Library to Instrument Executable Formats Version 0.15.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
LIEF::ELF::GnuHash Class Reference

Class which provides a view over the GNU Hash implementation. Most of the fields are read-only since the values are re-computed by the LIEF::ELF::Builder. More...

#include <GnuHash.hpp>

Inheritance diagram for LIEF::ELF::GnuHash:
Inheritance graph
[legend]
Collaboration diagram for LIEF::ELF::GnuHash:
Collaboration graph
[legend]

Public Member Functions

 GnuHash (uint32_t symbol_idx, uint32_t shift2, std::vector< uint64_t > bloom_filters, std::vector< uint32_t > buckets, std::vector< uint32_t > hash_values={})
 
GnuHashoperator= (const GnuHash &copy)=default
 
 GnuHash (const GnuHash &copy)=default
 
 GnuHash (GnuHash &&)=default
 
GnuHashoperator= (GnuHash &&)=default
 
uint32_t nb_buckets () const
 Return the number of buckets.
 
uint32_t symbol_index () const
 Index of the first symbol in the dynamic symbols table which accessible with the hash table.
 
uint32_t shift2 () const
 Shift count used in the bloom filter.
 
uint32_t maskwords () const
 Number of bloom filters used. It must be a power of 2.
 
const std::vector< uint64_t > & bloom_filters () const
 Bloom filters.
 
const std::vector< uint32_t > & buckets () const
 Hash buckets.
 
const std::vector< uint32_t > & hash_values () const
 Hash values.
 
bool check_bloom_filter (uint32_t hash) const
 Check if the given hash passes the bloom filter.
 
bool check_bucket (uint32_t hash) const
 Check if the given hash passes the bucket filter.
 
bool check (const std::string &symbol_name) const
 Check if the symbol probably exists. If the returned value is false you can assume at 100% that the symbol with the given name doesn't exist. If true, you can't do any assumption.
 
bool check (uint32_t hash) const
 Check if the symbol associated with the given hash probably exists. If the returned value is false you can assume at 100% that the symbol doesn't exists. If true you can't do any assumption.
 
void accept (Visitor &visitor) const override
 
- Public Member Functions inherited from LIEF::Object
 Object (const Object &other)
 
Objectoperator= (const Object &other)
 
template<class T >
output_t< T > as ()
 
template<class T >
output_const_t< T > as () const
 
virtual bool operator== (const Object &other) const
 
virtual bool operator!= (const Object &other) const
 

Additional Inherited Members

- Public Types inherited from LIEF::Object
template<class T >
using output_t = add_pointer_t<decay_t<T>>
 
template<class T >
using output_const_t = add_pointer_t<add_const_t<decay_t<T>>>
 

Detailed Description

Class which provides a view over the GNU Hash implementation. Most of the fields are read-only since the values are re-computed by the LIEF::ELF::Builder.

Member Function Documentation

◆ accept()

void LIEF::ELF::GnuHash::accept ( Visitor & visitor) const
overridevirtual

Implements LIEF::Object.

◆ nb_buckets()

uint32_t LIEF::ELF::GnuHash::nb_buckets ( ) const
inline

Return the number of buckets.

See also
GnuHash::buckets

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