Package-level declarations

Types

Link copied to clipboard
data class AllowedExternalSymbol(val symbol: String, val mangled: String? = null, val category: SymbolCategory)
Link copied to clipboard
data class AllowedExternalSymbolsReport(val mode: SymbolVerificationMode, val count: Int, val symbols: List<AllowedExternalSymbol>)
Link copied to clipboard

LLVM symbol kinds relevant to undefined-boundary use analysis.

Link copied to clipboard
open class StigArtifactProblemReporter(projectPath: String, taskName: String, logger: StigTaskReporter, problemsFile: File, failAt: ProblemSeverity?, events: StigTaskReporter? = null, exception: (String, Throwable?) -> RuntimeException = { message, cause -> IllegalStateException( message, cause ) }) : StigProblemReporter
Link copied to clipboard

Why an unresolved symbol is permitted by STIG's symbol-completeness check.

Link copied to clipboard

Symbol verification used by stigAnalysisP6RunAnalyzer before native analysis starts.

Link copied to clipboard
data class SymbolVerifierInputs(val projectPath: String, val mode: SymbolVerificationMode, val moduleLlFile: File, val moduleBcFile: File?, val requiredSymbolsFile: File?, val provenanceBcDir: File?, val provenanceCompileCommandsFile: File?, val unresolvedApplicationSymbolsOutFile: File, val allowedExternalSymbolsOutFile: File, val prototypeStrippedModuleFile: File, val optBinary: String, val nmBinary: String, val cxxfiltBinary: String, val ignorePatterns: List<String> = emptyList(), val failAt: ProblemSeverity?)

Inputs for verifyRequiredSymbolsWithTools. Bundled so the call from StigAnalysisP6RunAnalyzerTask doesn't grow into a 14-parameter function call.

Link copied to clipboard
data class UnresolvedApplicationSymbol(val symbol: String, val mangled: String? = null, val filePath: String? = null, val reason: UnresolvedApplicationSymbolReason)

Functions

Link copied to clipboard
fun classifySymbol(demangled: String, mangled: String?): SymbolCategory?

Matches a symbol name to a built-in external category, or returns null when no category matches.

Link copied to clipboard
fun llvmReferencedUndefinedSymbolsWithTools(executor: NativeToolExecutor, moduleFile: File, originalUndefinedSymbols: Set<String>, symbolKinds: Map<String, LlvmSymbolKind>, strippedModuleFile: File, optBinary: String, nmBinary: String): Set<String>

Removes debug information from a temporary module, then removes unused function prototypes with LLVM's use-def aware pass. Debug-only DISubprogram attachments must not keep declarations alive: they describe source symbols but do not represent executable calls, function-pointer initializers, aliases, or other IR dependencies. Undefined globals are retained even when they have no current IR use: vtables and other externally populated globals are boundary state, and callers do not have enough whole-program evidence to discard them. Unknown symbol kinds are retained for the same reason.

Link copied to clipboard

Reads function/global declarations and definitions from a textual LLVM module.

Link copied to clipboard
fun matchesConfiguredSymbolIgnore(symbol: String, mangled: String?, patterns: List<String>): Boolean
Link copied to clipboard

One obligation per exact symbol; the aggregate count is context, not a substitute for its subjects.

Link copied to clipboard
fun verifyRequiredSymbolsWithTools(inputs: SymbolVerifierInputs, executor: NativeToolExecutor, logger: StigTaskReporter, taskName: String, reporter: StigArtifactProblemReporter, events: StigTaskReporter? = null): List<UnresolvedApplicationSymbol>

Precondition: verify that every symbol PhASAR will need is present in the linked module. Called from StigAnalysisP6RunAnalyzerTask before the analyzer subprocess starts.

Generated with STIG