Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

CLI Option Parsing

This page documents the command-line option parsing infrastructure in nvlink v13.0.88: the parser framework, option entry struct layout, registration sequence, post-extraction validation, mutual-exclusion enforcement, and global variable mappings. For the complete alphabetically-sorted quick-reference table of all flags, see CLI Flags Reference.

Parser Infrastructure

Option parsing is a self-contained subsystem at addresses 0x42C510--0x42F640. The parser is a generic, reusable framework (shared with cicc and ptxas) that handles option registration, argv scanning, value extraction, help formatting, and validation. nvlink creates one parser instance at the start of nvlink_parse_options (0x427AE0) and destroys it implicitly when the function returns.

Core Functions

AddressName (recovered)SizeRole
0x42DFE0option_parser_create4539 BAllocates 56-byte parser struct, creates two hash tables (by long name, by short name), registers default entries
0x42F130option_register4936 BRegisters a single option: allocates 120-byte entry, populates fields, inserts into both hash tables
0x42E5A0option_parse_argv9518 BParses argc/argv against registered options, handles --/- prefix, = assignment, response files (@file), unknown-option collection
0x42E390option_get_value2910 BExtracts a parsed option value into a caller-supplied variable (1/4/8 byte copy depending on type)
0x42E580option_was_specified163 BReturns boolean: was this option present on the command line? Used for presence-detection vs. value extraction
0x42D700option_format_help5589 BFormats a single option's help entry: "--%s%s%s%s", "(-%s)", appends default/allowed values
0x42DBC0option_validate_value5065 BValidates parsed value against type constraints: "32-bit integer", "64-bit integer", "32-bit hex", "64-bit hex"
0x42F560option_print_help1116 BIterates all registered options and calls option_format_help for each
0x42F640option_generate_tkinfo430 BSerializes parsed option state into tkinfo section data
0x42C510option_hash_lookup4190 BHash table operations for O(1) option lookup by name

Parser Object Layout (56 bytes)

The parser object (sub_42DFE0 return value) is allocated from the "nvlink option parser" memory arena:

OffsetSizeField
08Pointer to first option entry (linked list head)
88Pointer to last option entry (linked list tail)
168Hash table pointer: long-name lookup
248Hash table pointer: short-name lookup
328Pointer to default file-list option entry (name = " ")
408Arena pointer (for allocations)
488Pointer to "__internal_unknown_opt" entry

Option Entry Layout (120 bytes)

Each option registered by option_register occupies 120 bytes:

OffsetSizeField
08Long name string pointer ("output-file", "debug", etc.)
88Short name string pointer ("o", "g", etc.), or NULL
164Type code: 0 = file-list, 1 = bool, 2 = string, 4 = integer
204Multiplicity: 0 = none (bool), 1 = single value, 2 = multi-value (accumulates)
244Flags (bitmask, see below)
284(padding)
328Allowed keywords string ("unknown,X86,X86_64,ARMv7,AARCH64,PPC64LE")
408(reserved)
488Default value string ("64", "0", "false", "unknown")
568Default keyword string
648Value placeholder for help ("<file name>", "<N>", "<gpu architecture name>")
728Help text string pointer
808Parsed value storage (for single-value options)
888Parsed value list head (for multi-value options)
968Link: next option in parser's linked list
1048Link: hash chain for long-name table
1128Link: hash chain for short-name table

Type Codes

CodeMeaningValue extractionStorage
0File list (positional args)option_get_value(..., 8)qword pointer to linked list
1Boolean flagoption_get_value(..., 1)byte (0 or 1)
2Stringoption_get_value(..., 8)qword pointer to string
4Integeroption_get_value(..., 4)dword

Flag Bits

The flags field at offset 24 controls parser behavior:

BitValueMeaning
20x04Internal/hidden option (not shown in --help)
30x08Undocumented/internal (stronger hiding)
40x10Accepts negative form (--no-<name>)

Registration and Extraction Flow

The nvlink_parse_options function (0x427AE0, 30272 bytes, 1299 lines) follows a strict sequence:

1. parser = option_parser_create(0)                    // 0x42DFE0
2. For each of ~65 options:
     option_register(parser, long, short, type,        // 0x42F130
                     mult, flags, keywords, reserved,
                     default, default_kw, placeholder, help)
3. option_parse_argv(parser, argc, argv)               // 0x42E5A0
4. Handle immediate-exit options:
     if option_was_specified("trap-into-debugger"):     // 0x42E580
         install_trap_handler()                         // 0x42FA60
     if option_was_specified("help"):
         print_help_and_exit()                          // 0x42F560 + 0x44A420
     if option_was_specified("version"):
         print_version_and_exit()                       // 0x44A420
5. For each option:
     option_get_value(parser, name, &global_var, size)  // 0x42E390
6. Post-extraction validation:
     - Architecture range checks (sm > 19)
     - Mercury mode detection (sm > 99)
     - LTO consistency checks
     - Mutual-exclusion enforcement
     - CUDA API version parsing
7. tkinfo = option_generate_tkinfo(parser, ...)         // 0x42F640

Option Catalog

For the complete alphabetically-sorted flag table (all 68 entries with types, defaults, and one-line descriptions), see CLI Flags Reference.

The remainder of this page documents the implementation-level details: how each option is registered, what global variable it maps to, validation logic, and inter-option dependencies. Options are grouped by functional category below.

Output Options

Global variable mappings:

OptionGlobal VariableRegistration
output-filefilename (BSS)type=string, mult=1, flags=0
register-link-binariesqword_2A5F2E0type=string, mult=1, flags=0
dot-fileqword_2A5F2D0type=string, mult=1, flags=4
gen-host-linker-scriptqword_2A5F1D0type=string, mult=1, flags=0
relocatable-linkbyte_2A5F1E8type=bool, mult=0, flags=0
sharedbyte_2A5F1D8type=bool, mult=0, flags=4

The gen-host-linker-script option accepts keywords lcs-aug and lcs-abs (default: lcs-abs). The value lcs-aug sets dword_2A77DC0 = 1 (standalone SECTIONS fragment, 130 bytes, written to file or stdout), while lcs-abs sets it to 2 (full augmented script: ld --verbose pipeline + append SECTIONS + ld -T validation). The mapping is computed by a byte-by-byte compare against the literal "lcs-aug" at sub_427AE0 lines 1012-1027 (see Mode Dispatch).

Debug Options

Global variable mappings:

OptionGlobal VariableRegistration
debugbyte_2A5F310type=bool, mult=0, flags=0
suppress-debug-infobyte_2A5F226type=bool, mult=0, flags=0
edbgdword_2A5F308type=int, mult=1, flags=8

When --suppress-debug-info is specified with --debug, the effect is to clear byte_2A5F310 (debug flag) to 0, effectively disabling debug output. If specified without --debug, a warning is emitted: "-suppress-debug-info" conflicts with "no -g".

Architecture Options

Global variable mappings:

OptionGlobal VariableRegistration
archqword_2A5F318type=string, mult=1, flags=0
machinedword_2A5F30Ctype=int, mult=1, flags=16
cpu-archqword_2A5F2A0type=string, mult=1, flags=0
report-archbyte_2A5F29Ctype=bool, mult=0, flags=0

The arch option is registered with an allowed-keywords callback (sub_486EC0(1)) that validates the architecture name against the supported SM table. The machine option defaults to "64" and only accepts value 64; specifying 32 on SM > 72 produces a fatal error.

The cpu-arch option accepts keywords: unknown, X86, X86_64, ARMv7, AARCH64, PPC64LE (default: unknown).

Architecture validation logic (post-extraction):

sm = parse_sm_number(arch_string)         // sub_44E3E0
if sm <= 19:
    fatal_error("unsupported arch")
byte_2A5F224 = (sm > 72)                  // "new-style" ELF flag
if sm > 72 && machine == 32:
    fatal_error("sm > 72 requires 64-bit")
    byte_2A5F224 = 0
if sm > 99:                               // Mercury (Blackwell+)
    byte_2A5F222 = 1                      // mercury mode
    byte_2A5F225 = 1                      // SASS output mode
    byte_2A5B510 = 0
elif sm > 89:                             // sm_90+ needs SASS mode
    if sm <= 89:
        fatal_error("SASS mode requires sm >= 90")

Library Options

Global variable mappings:

OptionGlobal VariableRegistration
libraryqword_2A5F2F8type=string, mult=2, flags=16
library-pathqword_2A5F300type=string, mult=2, flags=16
host-linker-optionsqword_2A5F2E8type=string, mult=2, flags=4
keep-system-librariesbyte_2A5F2C2type=bool, mult=0, flags=0
host-ccbin::src (BSS)type=string, mult=1, flags=4

Both library and library-path have multiplicity 2 (multi-value), so repeated -l / -L flags accumulate into linked lists. host-linker-options is accepted and stored but ignored by the device linker.

Linking Behavior Options

Global variable mappings:

OptionGlobal VariableRegistration
preserve-relocsbyte_2A5F2CEtype=bool, mult=0, flags=0
reserve-null-pointer(local, then byte_2A5F2CD)type=bool, mult=0, flags=4
dont-reserve-null-pointer(local)type=bool, mult=0, flags=4
allow-undefined-globalsbyte_2A5F2CCtype=bool, mult=0, flags=4
disable-smem-reservationbyte_2A5F210type=bool, mult=1, flags=4
syscall-const-offsetdword_2A5F2C8type=int, mult=1, flags=4
force-relabyte_2A5F2AAtype=bool, mult=0, flags=4
no-optbyte_2A5F2A9type=bool, mult=0, flags=8
optimize-data-layoutbyte_2A5F2A8type=bool, mult=0, flags=8
enable-extended-smembyte_2A5F1FDtype=bool, mult=1, flags=4

The null-pointer reservation logic computes byte_2A5F2CD = reserve-null-pointer AND NOT dont-reserve-null-pointer. The dont-reserve-null-pointer flag always wins if both are specified.

The disable-smem-reservation and enable-extended-smem options accept true/false as values (boolean with multiplicity 1), with default "false".

no-opt and optimize-data-layout are mutually exclusive; specifying both produces a fatal error.

Dead Code Elimination Options

Global variable mappings:

OptionGlobal VariableRegistration
kernels-usedqword_2A5F2B8type=string, mult=2, flags=0
variables-usedqword_2A5F2B0type=string, mult=2, flags=0
use-host-infobyte_2A5F213type=bool, mult=0, flags=0
ignore-host-infobyte_2A5F212type=bool, mult=0, flags=0

use-host-info and ignore-host-info are mutually exclusive. If neither is specified, use-host-info defaults to true (byte_2A5F213 = 1, byte_2A5F214 = 1). If --relocatable-link is specified, ignore-host-info is forced on. If --kernels-used or --variables-used is specified, use-host-info is forced off with a warning.

LTO Options

Global variable mappings:

OptionGlobal VariableRegistration
link-time-optbyte_2A5F288type=bool, mult=0, flags=0
dltobyte_2A5F287type=bool, mult=0, flags=0
force-partial-ltobyte_2A5F285type=bool, mult=0, flags=4
force-whole-ltobyte_2A5F284type=bool, mult=0, flags=4
nvvmpathqword_2A5F278type=string, mult=1, flags=0
emit-ptxbyte_2A5F29Atype=bool, mult=0, flags=0
split-compiledword_2A5B518type=int, mult=1, flags=0
split-compile-extendeddword_2A5B514type=int, mult=1, flags=0

When --dlto is specified, byte_2A5F288 (the LTO master flag) is set to 1. The LTO options have extensive mutual-exclusion and dependency validation:

  • --nvvmpath is required with -lto; omitting it produces: "-nvvmpath should be specified with -lto"
  • --force-partial-lto and --force-whole-lto are mutually exclusive
  • --emit-ptx requires -lto
  • --Ofast-compile requires -lto
  • --force-partial-lto without -dlto is an error
  • --force-whole-lto without -dlto is an error
  • --relocatable-link forces partial LTO mode

Both split-compile and split-compile-extended default to 1 (single-threaded). When --emit-ptx is specified with multi-threaded split-compile, the threads are forced to 1 with a warning.

LTO Forwarding Options

Global variable mappings:

OptionGlobal VariableRegistration
Xptxasqword_2A5F238type=string, mult=2, flags=0
Xnvvmqword_2A5F230type=string, mult=2, flags=0
maxrregcountdword_2A5F22Ctype=int, mult=1, flags=0
Ofast-compileqword_2A5F258type=string, mult=1, flags=0

The Ofast-compile option accepts: "0", "min", "mid", "max" (default: "0"). Any other value produces a fatal error referencing "--Ofast-compile". The values control optimization aggressiveness during LTO compilation:

  • "max": Focus only on the fastest compilation speed, disabling many optimizations
  • "mid": Balance compile time and runtime, disabling expensive optimizations
  • "min": More minimal impact on both compile time and runtime
  • "0": Disables fast-compile (full optimization)

Warning and Diagnostic Options

Global variable mappings:

OptionGlobal VariableRegistration
disable-warningsbyte_2A5F2C4type=bool, mult=0, flags=0
warning-as-errorbyte_2A5F2C3type=bool, mult=0, flags=0
disable-infosbyte_2A5F2C5type=bool, mult=0, flags=0
suppress-stack-size-warningbyte_2A5F299type=bool, mult=0, flags=0
suppress-arch-warningbyte_2A5F298type=bool, mult=0, flags=0
extra-warningsbyte_2A5F289type=bool, mult=0, flags=0

After extraction, warning-as-error and disable-warnings/disable-infos are applied immediately:

sub_468420(byte_2A5F2C3);   // configure warning-as-error in diagnostics subsystem
sub_468430(byte_2A5F2C4);   // configure disable-warnings
sub_468430(byte_2A5F2C5);   // configure disable-infos

Verbose and Debug Output Options

Global variable mappings:

OptionGlobal VariableRegistration
verbosebyte_2A5F2D8type=bool, mult=0, flags=0
verbose-keepbyte_2A5F29Btype=bool, mult=0, flags=8
verbose-tkinfobyte_2A5F223type=bool, mult=1, flags=4
dump-callgraphbyte_2A5F216type=bool, mult=0, flags=0
dump-callgraph-no-demanglebyte_2A5F215type=bool, mult=0, flags=0

dump-callgraph and dump-callgraph-no-demangle are mutually exclusive.

When --debug is specified and --verbose-tkinfo was not explicitly given, byte_2A5F223 is forced to 1 (tkinfo is always verbose in debug builds).

CUDA API and Compatibility Options

Global variable mappings:

OptionGlobal VariableRegistration
cuda-api-versionqword_2A5F218type=string, mult=1, flags=4
nv-hostqword_2A5F1F0type=string, mult=1, flags=4
uidx-fileqword_2A5F208type=string, mult=1, flags=0
tool-name(extracted, then updates path)type=string, mult=1, flags=4

The cuda-api-version value is parsed with sscanf("%u.%u"). The major version must equal the toolkit version (dword_2A5B50C); the minor version is clamped to the minimum of the specified value and the built-in default (dword_2A5B508).

Security Options

Global variable mappings:

OptionGlobal VariableRegistration
device-stack-protectorbyte_2A5F1FEtype=bool, mult=1, flags=0
device-stack-protector-frame-size-thresholddword_2A5F1F8type=int, mult=1, flags=4

Both options have their "was specified" flags stored separately (byte_2A5F1FF for device-stack-protector, byte_2A5F1FC for device-stack-protector-frame-size-threshold), retrieved via option_was_specified.

Internal / Undocumented Options

Global variable mappings:

OptionGlobal VariableRegistration
fdcmptbyte_2A5F228type=bool, mult=0, flags=4
uumnbyte_2A5F227type=bool, mult=0, flags=4
timeqword_2A5F290type=string, mult=1, flags=0

fdcmpt is a forward-compatibility flag. It is validated post-extraction: if fdcmpt is set but uumn is not set, a warning is emitted ("-fdcmpt"). If both are set but SM <= 69, a fatal error is produced. The flag controls data-model compatibility across architectures (exact semantics not fully determined from decompilation).

uumn is a companion to fdcmpt and has no help text.

The time option enables CSV timing output (used by NVIDIA's build infrastructure for performance tracking). When the file argument is "-", timing data goes to stdout.

Meta Options

Global variable mappings:

OptionGlobal VariableRegistration
help(immediate exit)type=bool, mult=0, flags=0
version(immediate exit)type=bool, mult=0, flags=0
options-file(processed by parser)type=file-list, mult=2, flags=0
trap-into-debugger(immediate action)type=bool, mult=0, flags=8

--help output format:

Usage  : nvlink [options] <objects>

followed by formatted help for all non-hidden options.

--version output format:

nvlink: NVIDIA (R) Cuda linker
Copyright (c) 2005-2025 NVIDIA Corporation
Built on Wed_Aug_20_01:58:59_PM_PDT_2025
Cuda compilation tools, release 13.0, V13.0.88
Build cuda_13.0.r13.0/compiler.36424714_0

--options-file (type 0 = file-list) is handled by the parser itself during option_parse_argv: response files are expanded in-place before option matching.

--trap-into-debugger installs signal handlers (via sub_42FA60) that trap into a debugger on assertion failure, then continues normal option parsing.

Post-Extraction Validation

After extracting all option values into global variables, nvlink_parse_options performs extensive cross-validation. The mutual-exclusion conflicts all use sub_467460 (the error/warning/fatal dispatcher) with format string unk_2A5B650 for fatal conflicts:

Option AOption BResult
--no-opt--optimize-data-layoutFatal error
--dump-callgraph--dump-callgraph-no-demangleFatal error
--use-host-info--ignore-host-infoFatal error
--force-partial-lto--force-whole-ltoFatal error
--suppress-debug-info(no --debug)Fatal error
--force-partial-lto(no --dlto)Fatal error
--force-whole-lto(no --dlto)Fatal error
--emit-ptx(no --dlto)Fatal error
--Ofast-compile(no --dlto)Fatal error
--preserve-relocs(SM > 89)Warning: not supported
-m32(SM >= 90)Fatal error

Compilation Mode Determination

The extracted options determine the overall compilation mode stored in dword_2A5B528:

ModeValueCondition
Normal0Default
Passthrough2byte_2A5F2C1 (output-is-archive flag)
LTO4byte_2A5F288 (link-time-opt)
SASS6byte_2A5F225 (SASS output mode, SM > 89 or mercury)

Global Variable Map

Complete mapping from option name to BSS global variable address, sorted by address:

AddressSizeOptionDescription
byte_2A5F1FC1(was-specified)device-stack-protector-frame-size-threshold was specified
byte_2A5F1FD1enable-extended-smemExtended shared memory flag
byte_2A5F1FE1device-stack-protectorStack protector enable
byte_2A5F1FF1(was-specified)device-stack-protector was specified
dword_2A5F1F84device-stack-protector-frame-size-thresholdFrame size threshold
qword_2A5F1F08nv-hostPath to nv.host file
byte_2A5F1E81relocatable-linkRelocatable/incremental link
byte_2A5F1D81sharedShared library flag
qword_2A5F1D08gen-host-linker-scriptHost linker script type
qword_2A5F2008(derived)tkinfo data pointer
qword_2A5F2088uidx-filePath to uidx file
byte_2A5F2101disable-smem-reservationShared memory reservation disable
byte_2A5F2121ignore-host-infoIgnore host info
byte_2A5F2131use-host-infoUse host info
byte_2A5F2141(derived)Host info active (either explicit or default)
byte_2A5F2151dump-callgraph-no-demangleDump callgraph without demangling
byte_2A5F2161dump-callgraphDump callgraph
qword_2A5F2188cuda-api-versionAPI version string
byte_2A5F2221(derived)Mercury mode (sm > 99)
byte_2A5F2231verbose-tkinfoVerbose tkinfo generation
byte_2A5F2241(derived)New-style ELF (sm > 72)
byte_2A5F2251(derived)SASS output mode
byte_2A5F2261suppress-debug-infoSuppress debug symbols
byte_2A5F2271uumnUndocumented compatibility flag
byte_2A5F2281fdcmptForward-compatibility flag
dword_2A5F22C4maxrregcountMax register count (LTO)
qword_2A5F2308XnvvmNVVM option list
qword_2A5F2388Xptxasptxas option list
qword_2A5F2588Ofast-compileFast-compile level string
qword_2A5F2788nvvmpathPath to libnvvm
byte_2A5F2841force-whole-ltoForce whole-program LTO
byte_2A5F2851force-partial-ltoForce partial LTO
byte_2A5F2861(derived)Partial-LTO active
byte_2A5F2871dltoDLTO alias flag
byte_2A5F2881link-time-optLTO master flag
byte_2A5F2891extra-warningsExtra warnings enable
byte_2A5F29A1emit-ptxEmit PTX output
byte_2A5F29B1verbose-keepKeep intermediates
byte_2A5F29C1report-archReport arch in errors
qword_2A5F2908timeTiming CSV file path
byte_2A5F2981suppress-arch-warningSuppress arch warning
byte_2A5F2991suppress-stack-size-warningSuppress stack size warning
qword_2A5F2A08cpu-archCPU architecture string
byte_2A5F2A81optimize-data-layoutForce data optimization
byte_2A5F2A91no-optDisable optimization
byte_2A5F2AA1force-relaForce RELA relocations
qword_2A5F2B08variables-usedVariable keep list
qword_2A5F2B88kernels-usedKernel keep list
byte_2A5F2C01(derived)Arch capability flag (sub_44E4F0)
byte_2A5F2C11(derived)Output-is-archive flag (sub_44E490)
byte_2A5F2C21keep-system-librariesKeep system libs
byte_2A5F2C31warning-as-errorWerror flag
byte_2A5F2C41disable-warningsDisable warnings
byte_2A5F2C51disable-infosDisable info messages
dword_2A5F2C84syscall-const-offsetSyscall constant offset
byte_2A5F2CC1allow-undefined-globalsAllow undefined globals
byte_2A5F2CD1(derived)Reserve-null-pointer effective flag
byte_2A5F2CE1preserve-relocsPreserve relocations
qword_2A5F2D08dot-fileCallgraph DOT file path
byte_2A5F2D81verboseVerbose mode
qword_2A5F2E08register-link-binariesRegistration output path
qword_2A5F2E88host-linker-optionsXlinker option list
qword_2A5F2F88libraryLibrary list
qword_2A5F3008library-pathLibrary search paths
dword_2A5F3084edbgELF debug level
byte_2A5F3101debugDebug compile flag
dword_2A5F30C4machineMachine bits (64)
dword_2A5F3144(derived)Parsed SM number
qword_2A5F3188archArchitecture string
qword_2A5F3288(positional)Raw input file list
qword_2A5F3308(positional)Processed input file linked list
dword_2A5B5084(derived)CUDA API minor version
dword_2A5B50C4(derived)CUDA API major version
dword_2A5B5144split-compile-extendedExtended split-compile threads
dword_2A5B5184split-compileNVVM split-compile threads
dword_2A5B5284(derived)Compilation mode
byte_2A5B52C1(derived)Arch-is-supported flag
filename8output-fileOutput file path
::src8host-ccbinHost compiler binary path

Response File Expansion

The option_parse_argv function (0x42E5A0) handles response files (also called options files) through the --options-file / -optf mechanism and the @file prefix. When the parser encounters an argument beginning with @, it reads the referenced file and expands its contents as additional command-line arguments in-place. This is recursive: a response file can reference other response files.

The --options-file option (type 0 = file-list, multiplicity 2) achieves the same effect through the parser's file-list processing infrastructure.

Interaction with Main

The nvlink_parse_options function is called exactly once from main (0x409800):

// In main():
arena = arena_create_named("nvlink option parser");     // sub_432020
// ... also creates "nvlink memory space" arena ...
nvlink_parse_options(argc, argv);                        // sub_427AE0
// All global variables are now populated.
// main() reads them directly for all subsequent pipeline decisions.

After nvlink_parse_options returns, the parser object itself is no longer referenced. All option values have been extracted into the global variables listed above, and the rest of the linker pipeline accesses those globals directly.

Cross-References

  • CLI Flags Reference -- complete alphabetically-sorted quick-reference table of all 68 flags with types, defaults, and visibility
  • Pipeline Overview -- how parsed flags drive mode dispatch and the 14-phase pipeline
  • Entry Point & Main -- main() calling context for nvlink_parse_options
  • Mode Dispatch -- how dword_2A77DC0 (set during option parsing) selects the code path
  • ptxas Option Forwarding -- how --Xptxas options are forwarded to the embedded ptxas compiler
  • LTO Option Forwarding -- how --Xptxas, --Xnvvm, --maxrregcount, and --Ofast-compile are forwarded to cicc/ptxas during LTO
  • Dead Code Elimination -- how --kernels-used, --variables-used, --use-host-info, and --ignore-host-info drive DCE
  • Debug Options -- detailed semantics of --debug, --suppress-debug-info, --edbg
  • Environment Variables -- environment variables that supplement CLI options (e.g., LIBRARY_PATH)
  • Architecture Profiles -- how --arch maps to the per-architecture vtable used throughout the pipeline
  • Compatibility -- cross-architecture matching rules gated by the parsed SM number
  • cicc wiki: CLI Flags -- cicc compiler CLI flags. The parser framework (option entry struct, hash table lookup, argv scanning) is shared infrastructure between nvlink, cicc, and ptxas
  • ptxas wiki: CLI Options -- ptxas CLI options, using the same shared parser framework

Confidence Assessment

ClaimConfidenceEvidence
Parser address range 0x42C510--0x42F640HIGHAll 10 function files exist in decompiled/ with matching addresses
sub_42DFE0 (option_parser_create), 4,539 BHIGHstat -c%s confirms exactly 4,539 bytes
sub_42F130 (option_register), 4,936 BHIGHstat -c%s confirms exactly 4,936 bytes
sub_42E5A0 (option_parse_argv), 9,518 BHIGHstat -c%s confirms exactly 9,518 bytes
sub_42E390 (option_get_value), 2,910 BHIGHstat -c%s confirms exactly 2,910 bytes
sub_42D700 (option_format_help), 5,589 BHIGHstat -c%s confirms exactly 5,589 bytes
sub_42DBC0 (option_validate_value), 5,065 BHIGHstat -c%s confirms exactly 5,065 bytes
sub_42C510 (option_hash_lookup), 4,190 BHIGHstat -c%s confirms exactly 4,190 bytes
sub_42E580 (option_was_specified), 163 BHIGHstat -c%s confirms exactly 163 bytes
sub_42F560 (option_print_help), 1,116 BHIGHstat -c%s confirms exactly 1,116 bytes
sub_42F640 (option_generate_tkinfo), 430 BHIGHstat -c%s confirms exactly 430 bytes
nvlink_parse_options at 0x427AE0, 30,272 B, 1,299 linesHIGHstat -c%s = 30,272; wc -l = 1,299
68 option registrations via sub_42F130HIGHgrep -c sub_42F130 in sub_427AE0 returns exactly 68
Parser object layout (56 bytes)MEDIUMInferred from decompiled allocation size and field access patterns; not directly labeled
Option entry layout (120 bytes)MEDIUMInferred from sub_42F130 allocation and field offsets; consistent across all call sites
Type codes (0=file-list, 1=bool, 2=string, 4=integer)HIGHVisible in sub_42E390 value extraction and sub_42F130 registration code
"nvlink option parser" arena stringHIGHString at 0x1d34123 in nvlink_strings.json
"trap-into-debugger" option stringHIGHString at 0x1d3294f in nvlink_strings.json
"-nvvmpath should be specified with -lto" validationHIGHString at 0x1d33dc8 in nvlink_strings.json
"-fdcmpt" forward-compatibility flagHIGHString at 0x1d32aa4 in nvlink_strings.json
"Ofast-compile" accepts 0/min/mid/maxHIGHString at 0x1d32324 in nvlink_strings.json; values from decompiled switch-case
Global variable address map (80+ entries)HIGHCross-verified against decompiled sub_427AE0; addresses match option_get_value calls
Mutual-exclusion table (10 conflict pairs)HIGHError calls visible in sub_427AE0 decompiled code after extraction
dword_2A77DC0 = !v8 + 1 for gen-host-linker-scriptHIGHLine 1027 of sub_427AE0 shows dword_2A77DC0 = !v8 + 1
Architecture validation: sm > 19, sm > 72, sm > 99 thresholdsHIGHThreshold comparisons visible in sub_427AE0 decompiled code
Compilation mode dword_2A5B528 values (0/2/4/6)MEDIUMValues inferred from conditional assignments in sub_427AE0; exact semantics partially interpreted