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

Cubin ELF Header, Program Headers & NOTE Sections

Addresses apply to ptxas v13.0.88 (CUDA 13.0). VA base 0x400000 (non-PIE).

Byte-exact capture of the cubin ELF header, the 6 program headers a final cubin carries, the two NVIDIA NOTE sections, and the .nv.compat EICOMPAT attribute stream, obtained by emitting real cubins (ptxas -arch=<sm> [-c] on minimal PTX) and reading the raw header / phdr / note bytes.

ELF identification & header

FieldFinal cubin-c relocatableNotes
e_ident[EI_OSABI]0x410x41earlier builds used the CUDA OSABI tag 0x33
e_ident[EI_ABIVERSION]0x080x08cuobjdump prints ABI=8; earlier builds used 0x07
e_machine190 (0xBE, EM_CUDA)190the ptxas host binary itself is EM_X86_64=62
e_type2 (ET_EXEC)1 (ET_REL)final = assembled cubin; relocatable keeps SHT_CUDA_* types
e_version1 (EV_CURRENT)1
e_entry00device entry is resolved by the driver, not ELF e_entry
e_phnum60a relocatable object carries no program headers

e_flags per architecture

The real SM lives in bits 8–15, the virtual SM in bits 16–23. Full words captured from emitted cubins:

Arche_flagsreal SM byteformat nibble
sm_750x06004b040x4b (75)0x04
sm_800x060050040x50 (80)0x04
sm_860x060056040x56 (86)0x04
sm_890x060059040x59 (89)0x04
sm_90 / sm_90a0x06005a040x5a (90)0x04
sm_100 / sm_100a0x060064020x64 (100)0x02
sm_103 / sm_103a0x060067020x67 (103)0x02
sm_120 / sm_120a0x060078020x78 (120)0x02
sm_121 / sm_121a0x060079020x79 (121)0x02

sm_90 and sm_90a produce identical e_flags; the 'a'/'f' variant is carried in .nv.compat EICOMPAT_ATTR_ISA_CLASS and the .note.nv.cuinfo virtual-SM field, not in e_flags.

Program headers (final sm_90 cubin)

A final cubin carries 6 program headers; a -c relocatable object carries none.

PHDRTypeFlagsCovers
PH0PT_PHDRR (0x4)program-header self-descriptor
PH1PT_LOADR (0x4)read-only image group (.nv.info / .symtab / notes / read-only)
PH2PT_LOADR (0x4)read-only driver constant banks (.nv.constant3 / .nv.constant4)
PH3PT_LOADR+X (0x5)executable SASS (.text.<entry>)
PH4PT_LOADR+W (0x6)NOBITS group (.nv.shared.<e> + .nv.global); memsz>0, filesz=0
PH5PT_LOADR (0x4)per-entry constant-bank-0 param area (.nv.constant0.<entry>)

NOTE sections

sh_type = SHT_NOTE (0x07); owner string "NVIDIA Corp\0" (namesz=12); note version u16 = 2.

Sectionn_typedescszDescription
.note.nv.tkinfo0x7d0 (2000)136toolkit info: noteVer=2, tool name "ptxas", tool version "Cuda compilation tools, release 13.0, V13.0.88", build branch, and the literal command-line args (e.g. "-arch sm_90 "). sh_flags = 0x02000000 (OS-specific bit).
.note.nv.cuinfo0x3e8 (1000)8CUDA info: 8-byte desc = u16 noteVer=2, u16 virtualSM (0x5a=90 for sm_90), u32 CUDA-API-version (0x82=130). sh_flags = 0x01000040 (OS bit + SHF_INFO_LINK). Raw: `02 00
.note.nv.cuverCUDA-version note name present in the binary string table; emitted in some configs.

.nv.compat EICOMPAT stream

.nv.compat (SHT_CUDA_COMPAT_INFO = 0x70000086) is an attribute stream whose wire format is identical to .nv.info[EIFMT(1B)][attr(1B)][value], 4-byte aligned. It is present in this build (absent in earlier ones) and carries the architecture-variant ('a'/'f') and Mercury-finalizer capability info. A plain sm_90 kernel emits 7 attributes. The EICOMPAT names are not reachable through a name-pointer array in the binary; codes were recovered by pairing the on-wire attr byte against cuobjdump's symbolic name for the same element.

CodeNameEIFMTObserved value
0EICOMPAT_ATTR_ERRORsentinel; never emitted
1EICOMPAT_ATTR_PADalignment padding
2EICOMPAT_ATTR_ISA_CLASSBVAL0x01 — arch-variant selector (carries the 'a'/'f' distinction)
3EICOMPAT_ATTR_INST_TENSORMAP_V1BVAL0x00 — tensormap v1 requirement level
4EICOMPAT_ATTR_INST_TCGEN05_MMA_DEPRECATED(string present; deprecated variant)
5EICOMPAT_ATTR_INST_TCGEN05_MMABVAL0x05 — tcgen05 MMA requirement level (Blackwell tensor core)
6EICOMPAT_ATTR_ENABLE_OPPORTUNISTIC_FINALIZATIONBVAL0x01
7EICOMPAT_ATTR_MERCURY_ISA_MAJOR_MINOR_VERSIONHVAL0x0101 (v1.1 on sm_90)
8EICOMPAT_ATTR_MERCURY_ISA_PATCH_VERSION(string present)
9EICOMPAT_ATTR_CUDA_ACCELERATOR_TARGETBVAL0x00 — accelerator target id; first element emitted
11EICOMPAT_ATTR_CAN_FASTPATH_FINALIZESVAL8-byte capability descriptor

Emission order for an sm_90 kernel (on-wire, not numeric): code 9, 2, 5, 7, 3, 6, 11. Raw bytes (off 0x63c, size 0x24):

02 09 00 | 02 02 01 | 02 05 05 | 03 07 01 01 | 02 03 00 | 02 06 01 | 04 0b 08 00  00000000 00000000