plugin_integrity.hpp file
Verify that a solver plugin is the one built with this gtopt.
Building blocks used by SolverRegistry before and after dlopen:
- ELF inspection: the GNU build-id note (
NT_GNU_BUILD_ID, emitted by the linker),DT_SONAMEandDT_RUNPATH/DT_RPATHread from a file on disk, and the build-id / path of an object already mapped into the process (viadl_iterate_phdr). No hashing: the linker's build-id is the identity. - The build-id manifest (
<plugin>.so.build-id, written by CMake next to each plugin at build and install time). - Pure policy functions deciding ok / warn / refuse for a build-id, build-tag or solver-version comparison, so the decisions are unit tested without loading anything.
Namespaces
- namespace gtopt
Classes
- struct gtopt::ElfIdentity
- Identity fields read from an ELF file (64-bit little-endian only).
- struct gtopt::IntegrityDecision
- struct gtopt::LinkedLibraryRecord
- struct gtopt::LoadedLibraryIdentity
- The solver library actually mapped in this process.
- struct gtopt::LoadedObject
- An object mapped into this process.
- struct gtopt::PluginIntegrityPolicy
- struct gtopt::PluginReport
- struct gtopt::SolverLibraryReport
- Solver-library identity of one solver provided by a plugin.
- struct gtopt::SolverVersion
- A solver version triple; components are -1 when unknown.
- struct gtopt::VersionPinOverrides