|
LIEF: Library to Instrument Executable Formats Version 1.0.0
|
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>


Public Member Functions | |
| GnuHash ()=default | |
| 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={}) | |
| GnuHash & | operator= (const GnuHash ©)=default |
| GnuHash (const GnuHash ©)=default | |
| GnuHash (GnuHash &&)=default | |
| GnuHash & | operator= (GnuHash &&)=default |
| ~GnuHash () override=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 |
| uint64_t | original_size () const |
| Public Member Functions inherited from LIEF::Object | |
| Object () | |
| Object (const Object &other) | |
| Object & | operator= (const Object &other) |
| Object (Object &&other) noexcept=default | |
| Object & | operator= (Object &&other) noexcept=default |
| 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 |
| virtual | ~Object () |
Static Public Member Functions | |
| template<class ELF_T> | |
| static std::unique_ptr< GnuHash > | parse (SpanStream &strm, uint64_t dynsymcount) |
| template<class ELF_T> | |
| static result< uint32_t > | nb_symbols (SpanStream &strm) |
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>>> |
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.
|
default |
Referenced by GnuHash(), GnuHash(), operator<<, operator=(), and operator=().
|
inline |
References bloom_filters(), buckets(), hash_values(), and shift2().
|
default |
References GnuHash().
|
default |
References GnuHash().
|
overridedefault |
|
overridevirtual |
Implements LIEF::Object.
|
inline |
Bloom filters.
Referenced by GnuHash().
|
inline |
| bool LIEF::ELF::GnuHash::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 LIEF::ELF::GnuHash::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.
References LIEF::hash().
| bool LIEF::ELF::GnuHash::check_bloom_filter | ( | uint32_t | hash | ) | const |
Check if the given hash passes the bloom filter.
References LIEF::hash().
|
inline |
Check if the given hash passes the bucket filter.
References LIEF::hash(), and nb_buckets().
|
inline |
|
inline |
Number of bloom filters used. It must be a power of 2.
|
inline |
|
static |
References LIEF_LOCAL.
|
inline |
References LIEF_LOCAL.
|
static |
References LIEF_LOCAL.
|
inline |
Shift count used in the bloom filter.
Referenced by GnuHash().
|
inline |
Index of the first symbol in the dynamic symbols table which accessible with the hash table.