template <const auto& Names, class ElfLayout = Elf<>, auto... SetArgs>

class PerfectSymbolFilter

Defined at line 217 of file ../../src/lib/elfldltl/include/lib/elfldltl/perfect-symbol-table.h

elfldltl::PerfectSymbolFilter is a PerfectSymbolMap

<const

Sym*> with some

conveniences for using it with the

<lib

/elfldltl/resolve.h> Module API.

Initialize it with pointers into a specific module's symbol table. Then use

it as a symbol lookup function for the chosen subset of that module.

Public Methods

template <auto& diag, auto& module>
bool Init (auto & diag, const auto & module, bool undef_ok)

This takes a Module API object as described in

<lib

/elfldltl/resolve.h>

and uses it to look up each symbol in the set. If the .Lookup() calls

return error, this bails out early with the error value. If the .Lookup()

calls return nullptr "success" (symbol not found), then the corresponding

map entry is just set to nullptr. If the optional undef_ok flag is not

set, then this calls diag.UndefinedSymbol for each undefined symbol

(bailing out early if it returns false). The return value is true if all

symbols were found or the diagnostics object said to keep going.

Defined at line 230 of file ../../src/lib/elfldltl/include/lib/elfldltl/perfect-symbol-table.h

const Sym * operator() (SymbolName & name)

A one-argument call just returns the const Sym* or nullptr.

Defined at line 250 of file ../../src/lib/elfldltl/include/lib/elfldltl/perfect-symbol-table.h

const Sym * operator() (const SymbolName & name)

Defined at line 251 of file ../../src/lib/elfldltl/include/lib/elfldltl/perfect-symbol-table.h

template <auto& ignored_context>
fit::result<bool, const Sym *> operator() (auto & ignored_context, SymbolName & name)

This can match the signature of the Lookup method for the Module API in

<lib

/elfldltl/resolve.h>, where the first argument is some diagnostics

object that won't be used here. Or it can match the signature of

ld::RemoteDynamicLinker::Module::SymbolFilter, where the first argument is

this same module.

Defined at line 261 of file ../../src/lib/elfldltl/include/lib/elfldltl/perfect-symbol-table.h