class SymbolName
Defined at line 41 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
SymbolName represents an identifier to be looked up in a symbol table. It's
really just a string_view with a cache of the string's hash value(s). The
type is constexpr friendly and when used in a constexpr context with a
string literal, it can precompute at compile time to optimize.
The Lookup calls are just front-ends that take a SymbolInfo object and call
its Lookup method (see below).
Note that though this is a cheaply-copyable type, it's always best to pass
it by mutable reference so its cache can be updated as needed (outside
constexpr context). Lookup has both const and non-const overloads, but the
const overload has to recompute every time if the hash isn't already cached.
ELF symbol names cannot contain NUL characters, so it's an invariant that
SymbolName cannot contain embedded NULs (unlike std::string_view, which can).
Construction and assignment enforce this by turning a std::string_view argument
that contains embedded NULs into the empty string.
Public Methods
void SymbolName ()
Defined at line 45 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
void SymbolName (const SymbolName & )
Defined at line 47 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
template <size_t N>
void SymbolName (const char (&)[N] name)
When constructing from a constant, precompute the hashes since it can be
done entirely in constexpr context.
Defined at line 52 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
template <size_t N>
void SymbolName (const char (&)[N] name)
When constructing from a constant, precompute the hashes since it can be
done entirely in constexpr context.
Defined at line 52 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
template <size_t N>
void SymbolName (const char (&)[N] name)
When constructing from a constant, precompute the hashes since it can be
done entirely in constexpr context.
Defined at line 52 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
void SymbolName (std::string_view name)
This will precompute the hashes in constexpr context, see below.
Defined at line 58 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
void SymbolName (std::string_view name)
This will precompute the hashes in constexpr context, see below.
Defined at line 58 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
void SymbolName (const char * name)
Defined at line 60 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
template <class SymbolInfo, class Sym>
void SymbolName (const SymbolInfo & si, const Sym & sym)
Convenient constructor using a symbol table entry (see below).
Defined at line 64 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
SymbolName & operator= (const SymbolName & )
Defined at line 66 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
SymbolName & operator= (std::string_view name)
Defined at line 68 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
SymbolName & operator= (std::string_view name)
Defined at line 68 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
SymbolName & operator= (const char * name)
Defined at line 77 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
uint32_t compat_hash ()
Defined at line 83 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
uint32_t compat_hash ()
Defined at line 90 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
uint32_t gnu_hash ()
Defined at line 92 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
uint32_t gnu_hash ()
Defined at line 99 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
template <class SymbolInfoType, typename Filter>
const typename SymbolInfoType::Sym * Lookup (const SymbolInfoType & si, Filter && filter)
Defined at line 102 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
template <class SymbolInfoType, typename Filter>
const typename SymbolInfoType::Sym * Lookup (const SymbolInfoType & si, Filter && filter)
A const object can't update its cache, but constexpr will already have it.
Defined at line 119 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
template <class SymbolInfoType>
auto Lookup (const SymbolInfoType & si)
Defined at line 126 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h
template <class SymbolInfoType>
auto Lookup (const SymbolInfoType & si)
Defined at line 131 of file ../../src/lib/elfldltl/include/lib/elfldltl/symbol.h