namespace StellaOps.Scanner.Analyzers.Native; /// /// Represents a declared dependency extracted from ELF dynamic sections. /// /// The shared library name from DT_NEEDED entry. /// The reason code for this dependency (e.g., "elf-dtneeded"). /// Symbol versions required from this dependency. public sealed record ElfDeclaredDependency( string Soname, string ReasonCode, IReadOnlyList VersionNeeds); /// /// Represents a symbol version requirement from .gnu.version_r section. /// /// The version string (e.g., "GLIBC_2.17"). /// The ELF hash of the version string. /// True if VER_FLG_WEAK is set, indicating this version is optional. public sealed record ElfVersionNeed(string Version, uint Hash, bool IsWeak = false); /// /// Contains all dynamic section information extracted from an ELF binary. /// /// The build-id of the binary (if present). /// The interpreter path (e.g., /lib64/ld-linux-x86-64.so.2). /// Runtime search paths from DT_RPATH (colon-separated, split into list). /// Runtime search paths from DT_RUNPATH (colon-separated, split into list). /// Declared dependencies from DT_NEEDED entries. public sealed record ElfDynamicInfo( string? BinaryId, string? Interpreter, IReadOnlyList Rpath, IReadOnlyList Runpath, IReadOnlyList Dependencies);