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

R_MERCURY Relocation Catalog

Complete reference listing of all 65 R_MERCURY relocation types defined in nvlink v13.0.88 for the capsule Mercury (capmerc) binary format. The binary contains 71 total R_MERCURY/MERCURY-bearing strings: 65 relocation type names, 2 trailing-space formatting duplicates, and 4 .nv.info attribute names -- all documented below. For semantic details, descriptor table structure, and dispatch logic, see R_MERCURY Relocations. For the CUDA counterpart catalog, see R_CUDA Relocation Catalog.

Encoding

Every R_MERCURY type is stored in ELF r_info as index + 0x10000. The relocation engine subtracts 0x10000 at dispatch time to index into the Mercury descriptor table at off_1D3CBE0. The name table lives at off_1D371E0 with 65 string pointers. The actual name strings occupy a contiguous pool at 0x1D35A17--0x1D35F5F (1,353 bytes including null terminators).

Complete Type Table

65 entries, sorted by index. The "String Address" column gives the .rodata address of each name string as found in nvlink_strings.json.

IndexELF ValueNameString AddressCategoryR_CUDA Equivalent
00x10000R_MERCURY_NONE0x1D35A17SentinelR_CUDA_NONE
10x10001R_MERCURY_G640x1D35A26Global addressR_CUDA_G64
20x10002R_MERCURY_ABS640x1D35A34Absolute dataR_CUDA_64
30x10003R_MERCURY_ABS320x1D35A44Absolute dataR_CUDA_32
40x10004R_MERCURY_ABS160x1D35A54Absolute dataR_CUDA_ABS16_* (4 types)
50x10005R_MERCURY_ABS32_LO0x1D35A64Absolute dataR_CUDA_ABS32_LO_* (4 types)
60x10006R_MERCURY_ABS32_HI0x1D35A77Absolute dataR_CUDA_ABS32_HI_* (4 types)
70x10007R_MERCURY_PROG_REL640x1D35A8APC-relative-- (Mercury-specific)
80x10008R_MERCURY_PROG_REL320x1D35A9FPC-relativeR_CUDA_PCREL_IMM24_* (24-bit)
90x10009R_MERCURY_PROG_REL32_LO0x1D35AB4PC-relative-- (Mercury-specific)
100x1000AR_MERCURY_PROG_REL32_HI0x1D35ACCPC-relative-- (Mercury-specific)
110x1000BR_MERCURY_TEX_HEADER_INDEX0x1D35AE4Texture/sampler/surfaceR_CUDA_TEX_HEADER_INDEX
120x1000CR_MERCURY_SAMP_HEADER_INDEX0x1D35AFFTexture/sampler/surfaceR_CUDA_SAMP_HEADER_INDEX
130x1000DR_MERCURY_SURF_HEADER_INDEX0x1D35B1BTexture/sampler/surfaceR_CUDA_SURF_HEADER_INDEX
140x1000ER_MERCURY_UNUSED_CLEAR640x1D35B37ClearR_CUDA_UNUSED_CLEAR64
150x1000FR_MERCURY_FUNC_DESC_640x1D35B50Function descriptorR_CUDA_FUNC_DESC_64
160x10010R_MERCURY_8_00x1D35B67Byte-levelR_CUDA_8_0
170x10011R_MERCURY_8_80x1D35B75Byte-levelR_CUDA_8_8
180x10012R_MERCURY_8_160x1D35B83Byte-levelR_CUDA_8_16
190x10013R_MERCURY_8_240x1D35B92Byte-levelR_CUDA_8_24
200x10014R_MERCURY_8_320x1D35BA1Byte-levelR_CUDA_8_32
210x10015R_MERCURY_8_400x1D35BB0Byte-levelR_CUDA_8_40
220x10016R_MERCURY_8_480x1D35BBFByte-levelR_CUDA_8_48
230x10017R_MERCURY_8_560x1D35BCEByte-levelR_CUDA_8_56
240x10018R_MERCURY_G8_00x1D35BDDGlobal byte-levelR_CUDA_G8_0
250x10019R_MERCURY_G8_80x1D35BECGlobal byte-levelR_CUDA_G8_8
260x1001AR_MERCURY_G8_160x1D35BFBGlobal byte-levelR_CUDA_G8_16
270x1001BR_MERCURY_G8_240x1D35C0BGlobal byte-levelR_CUDA_G8_24
280x1001CR_MERCURY_G8_320x1D35C1BGlobal byte-levelR_CUDA_G8_32
290x1001DR_MERCURY_G8_400x1D35C2BGlobal byte-levelR_CUDA_G8_40
300x1001ER_MERCURY_G8_480x1D35C3BGlobal byte-levelR_CUDA_G8_48
310x1001FR_MERCURY_G8_560x1D35C4BGlobal byte-levelR_CUDA_G8_56
320x10020R_MERCURY_FUNC_DESC_8_00x1D35C5BFunc desc byte-levelR_CUDA_FUNC_DESC_8_0
330x10021R_MERCURY_FUNC_DESC_8_80x1D35C73Func desc byte-levelR_CUDA_FUNC_DESC_8_8
340x10022R_MERCURY_FUNC_DESC_8_160x1D35C8BFunc desc byte-levelR_CUDA_FUNC_DESC_8_16
350x10023R_MERCURY_FUNC_DESC_8_240x1D35CA4Func desc byte-levelR_CUDA_FUNC_DESC_8_24
360x10024R_MERCURY_FUNC_DESC_8_320x1D35CBDFunc desc byte-levelR_CUDA_FUNC_DESC_8_32
370x10025R_MERCURY_FUNC_DESC_8_400x1D35CD6Func desc byte-levelR_CUDA_FUNC_DESC_8_40
380x10026R_MERCURY_FUNC_DESC_8_480x1D35CEFFunc desc byte-levelR_CUDA_FUNC_DESC_8_48
390x10027R_MERCURY_FUNC_DESC_8_560x1D35D08Func desc byte-levelR_CUDA_FUNC_DESC_8_56
400x10028R_MERCURY_ABS_PROG_REL32_LO0x1D35D21Abs PC-relative-- (Mercury-specific)
410x10029R_MERCURY_ABS_PROG_REL32_HI0x1D35D3DAbs PC-relative-- (Mercury-specific)
420x1002AR_MERCURY_PROG_REL8_00x1D35D59PC-rel byte-level-- (Mercury-specific)
430x1002BR_MERCURY_PROG_REL8_80x1D35D6FPC-rel byte-level-- (Mercury-specific)
440x1002CR_MERCURY_PROG_REL8_160x1D35D85PC-rel byte-level-- (Mercury-specific)
450x1002DR_MERCURY_PROG_REL8_240x1D35D9CPC-rel byte-level-- (Mercury-specific)
460x1002ER_MERCURY_PROG_REL8_320x1D35DB3PC-rel byte-level-- (Mercury-specific)
470x1002FR_MERCURY_PROG_REL8_400x1D35DCAPC-rel byte-level-- (Mercury-specific)
480x10030R_MERCURY_PROG_REL8_480x1D35DE1PC-rel byte-level-- (Mercury-specific)
490x10031R_MERCURY_PROG_REL8_560x1D35DF8PC-rel byte-level-- (Mercury-specific)
500x10032R_MERCURY_UNIFIED0x1D35E0FUnified tableR_CUDA_UNIFIED
510x10033R_MERCURY_UNIFIED_320x1D35E21Unified tableR_CUDA_UNIFIED_32
520x10034R_MERCURY_UNIFIED_8_00x1D35E36Unified byte-levelR_CUDA_UNIFIED_8_0
530x10035R_MERCURY_UNIFIED_8_80x1D35E4CUnified byte-levelR_CUDA_UNIFIED_8_8
540x10036R_MERCURY_UNIFIED_8_160x1D35E62Unified byte-levelR_CUDA_UNIFIED_8_16
550x10037R_MERCURY_UNIFIED_8_240x1D35E79Unified byte-levelR_CUDA_UNIFIED_8_24
560x10038R_MERCURY_UNIFIED_8_320x1D35E90Unified byte-levelR_CUDA_UNIFIED_8_32
570x10039R_MERCURY_UNIFIED_8_400x1D35EA7Unified byte-levelR_CUDA_UNIFIED_8_40
580x1003AR_MERCURY_UNIFIED_8_480x1D35EBEUnified byte-levelR_CUDA_UNIFIED_8_48
590x1003BR_MERCURY_UNIFIED_8_560x1D35ED5Unified byte-levelR_CUDA_UNIFIED_8_56
600x1003CR_MERCURY_ABS_PROG_REL320x1D35EECAbs PC-relative-- (Mercury-specific)
610x1003DR_MERCURY_ABS_PROG_REL640x1D35F05Abs PC-relative-- (Mercury-specific)
620x1003ER_MERCURY_UNIFIED32_LO0x1D35F1EUnified tableR_CUDA_UNIFIED32_LO_32
630x1003FR_MERCURY_UNIFIED32_HI0x1D35F35Unified tableR_CUDA_UNIFIED32_HI_32
640x10040R_MERCURY_NONE_LAST0x1D35F4CSentinelR_CUDA_NONE_LAST

Category Groups

Group 1: Sentinels (2 types)

IndexNameDescription
0R_MERCURY_NONENo-op placeholder, used for deleted or eliminated relocation entries
64R_MERCURY_NONE_LASTEnd-of-range sentinel, bounds the valid index space

The validation function sub_42F6C0 rejects any index >= 65 (0x41) with the diagnostic "unknown attribute". R_MERCURY_NONE produces an all-zero descriptor; the application engine returns immediately without patching.

Group 2: Global Address (1 type)

IndexNameBitsComputation
1R_MERCURY_G6464S + A

Primary relocation for global memory addresses (.nv.global, .nv.shared). Writes the full 64-bit result. Mercury has no 32-bit global counterpart (R_CUDA has both R_CUDA_G32 and R_CUDA_G64).

Group 3: Absolute Data (5 types)

IndexNameBitsComputation
2R_MERCURY_ABS6464S + A
3R_MERCURY_ABS3232S + A (truncated to 32 bits)
4R_MERCURY_ABS1616S + A (truncated to 16 bits)
5R_MERCURY_ABS32_LO16lo16(S + A)
6R_MERCURY_ABS32_HI16hi16(S + A)

Used for data sections and instruction immediates with absolute addressing. The _LO/_HI pair splits a 32-bit address across two instruction fields. Mercury uses a single position-independent type per width, unlike R_CUDA which has separate types per bit-position (R_CUDA_ABS32_20, R_CUDA_ABS32_23, R_CUDA_ABS32_26, R_CUDA_ABS32_32). The bit-field position is stored in the 64-byte descriptor entry, not the type name.

Group 4: PC-Relative (4 types)

IndexNameBitsComputation
7R_MERCURY_PROG_REL6464(S + A) - PC
8R_MERCURY_PROG_REL3232(S + A) - PC
9R_MERCURY_PROG_REL32_LO16lo16((S + A) - PC)
10R_MERCURY_PROG_REL32_HI16hi16((S + A) - PC)

Branch and call instructions (BRA, CALL, BRX). The PROG_REL prefix distinguishes these from the CUDA naming convention (PCREL_IMM24). Mercury supports 64-bit and 32-bit full-width PC-relative offsets plus a 16-bit split pair, versus CUDA which has only 24-bit PC-relative with bit-position variants. These four types have no direct R_CUDA equivalent (CUDA has R_CUDA_PCREL_IMM24_26 and R_CUDA_PCREL_IMM24_23 only).

Group 5: Texture / Sampler / Surface (3 types)

IndexNameDescription
11R_MERCURY_TEX_HEADER_INDEXTexture header table index
12R_MERCURY_SAMP_HEADER_INDEXSampler header table index
13R_MERCURY_SURF_HEADER_INDEXSurface header table index

These patch merged header table indices into instruction operands. During linking, per-module header tables are merged into a single global table; these relocations update references to the correct merged entry. Direct semantic equivalents of the R_CUDA *_HEADER_INDEX types.

Mercury drops the SLOT, HW_DESC, HW_SW_DESC, and BINDLESSOFF variants present in R_CUDA (18 types reduced to 3), consolidating resource binding into the header index mechanism alone.

Group 6: Clear (1 type)

IndexNameBitsComputation
14R_MERCURY_UNUSED_CLEAR6464Write zeros

Zeroes a 64-bit field in merged data sections or nullifies unused instruction fields. Mercury has only the 64-bit variant; R_CUDA additionally has R_CUDA_UNUSED_CLEAR32.

Group 7: Function Descriptor (1 type)

IndexNameBitsComputation
15R_MERCURY_FUNC_DESC_6464S + A

Resolves a reference to a function descriptor entry for indirect calls, virtual function tables, and device-side function pointers. Mercury has only the 64-bit variant; R_CUDA additionally has R_CUDA_FUNC_DESC_32 and 9 positional R_CUDA_FUNC_DESC32_* types.

Group 8: Byte-Level (8 types)

IndexNameByteComputation
16R_MERCURY_8_00byte_0(S + A)
17R_MERCURY_8_81byte_1(S + A)
18R_MERCURY_8_162byte_2(S + A)
19R_MERCURY_8_243byte_3(S + A)
20R_MERCURY_8_324byte_4(S + A)
21R_MERCURY_8_405byte_5(S + A)
22R_MERCURY_8_486byte_6(S + A)
23R_MERCURY_8_567byte_7(S + A)

Patch a single byte within a 64-bit data word. The suffix denotes the bit offset (byte 0 = bits 0--7, byte 7 = bits 56--63). Used for descriptor tables, attribute sections, and data structures requiring individual byte resolution. Direct equivalents of R_CUDA_8_0 through R_CUDA_8_56.

Group 9: Global Byte-Level (8 types)

IndexNameByteComputation
24R_MERCURY_G8_00byte_0(S + A) (global)
25R_MERCURY_G8_81byte_1(S + A) (global)
26R_MERCURY_G8_162byte_2(S + A) (global)
27R_MERCURY_G8_243byte_3(S + A) (global)
28R_MERCURY_G8_324byte_4(S + A) (global)
29R_MERCURY_G8_405byte_5(S + A) (global)
30R_MERCURY_G8_486byte_6(S + A) (global)
31R_MERCURY_G8_567byte_7(S + A) (global)

Byte-granularity variants of R_MERCURY_G64. Write a single byte of a global address at the specified position. Direct equivalents of R_CUDA_G8_0 through R_CUDA_G8_56.

Group 10: Function Descriptor Byte-Level (8 types)

IndexNameByteComputation
32R_MERCURY_FUNC_DESC_8_00byte_0(S + A) (func desc)
33R_MERCURY_FUNC_DESC_8_81byte_1(S + A) (func desc)
34R_MERCURY_FUNC_DESC_8_162byte_2(S + A) (func desc)
35R_MERCURY_FUNC_DESC_8_243byte_3(S + A) (func desc)
36R_MERCURY_FUNC_DESC_8_324byte_4(S + A) (func desc)
37R_MERCURY_FUNC_DESC_8_405byte_5(S + A) (func desc)
38R_MERCURY_FUNC_DESC_8_486byte_6(S + A) (func desc)
39R_MERCURY_FUNC_DESC_8_567byte_7(S + A) (func desc)

Byte-level function descriptor address patching. Mirrors the R_MERCURY_FUNC_DESC_64 / byte-level split pattern. Direct equivalents of R_CUDA_FUNC_DESC_8_0 through R_CUDA_FUNC_DESC_8_56.

Group 11: Absolute PC-Relative (4 types)

IndexNameBitsComputation
40R_MERCURY_ABS_PROG_REL32_LO16lo16(|S + A - PC|)
41R_MERCURY_ABS_PROG_REL32_HI16hi16(|S + A - PC|)
60R_MERCURY_ABS_PROG_REL3232|S + A - PC|
61R_MERCURY_ABS_PROG_REL6464|S + A - PC|

Hybrid absolute/PC-relative relocations computing an unsigned distance rather than a signed offset. Used for instruction encodings that require a non-negative displacement. The _LO/_HI split (indices 40--41) and the full-width variants (indices 60--61) appear at non-contiguous positions in the table, suggesting the split variants were defined first and full-width types were appended later.

No R_CUDA equivalent exists. This is an entirely Mercury-specific category.

Group 12: PC-Relative Byte-Level (8 types)

IndexNameByteComputation
42R_MERCURY_PROG_REL8_00byte_0((S + A) - PC)
43R_MERCURY_PROG_REL8_81byte_1((S + A) - PC)
44R_MERCURY_PROG_REL8_162byte_2((S + A) - PC)
45R_MERCURY_PROG_REL8_243byte_3((S + A) - PC)
46R_MERCURY_PROG_REL8_324byte_4((S + A) - PC)
47R_MERCURY_PROG_REL8_405byte_5((S + A) - PC)
48R_MERCURY_PROG_REL8_486byte_6((S + A) - PC)
49R_MERCURY_PROG_REL8_567byte_7((S + A) - PC)

Byte-level PC-relative patching for data tables (jump tables, exception tables) where PC-relative distances are stored in byte-addressable format. No R_CUDA equivalent exists. This is an entirely Mercury-specific category.

Group 13: Unified Table (12 types)

IndexNameBitsComputation
50R_MERCURY_UNIFIEDspecialGeneric UDT/UFT marker
51R_MERCURY_UNIFIED_3232S + A (unified offset)
52R_MERCURY_UNIFIED_8_08byte_0(S + A) (unified)
53R_MERCURY_UNIFIED_8_88byte_1(S + A) (unified)
54R_MERCURY_UNIFIED_8_168byte_2(S + A) (unified)
55R_MERCURY_UNIFIED_8_248byte_3(S + A) (unified)
56R_MERCURY_UNIFIED_8_328byte_4(S + A) (unified)
57R_MERCURY_UNIFIED_8_408byte_5(S + A) (unified)
58R_MERCURY_UNIFIED_8_488byte_6(S + A) (unified)
59R_MERCURY_UNIFIED_8_568byte_7(S + A) (unified)
62R_MERCURY_UNIFIED32_LO16lo16(S + A) (unified)
63R_MERCURY_UNIFIED32_HI16hi16(S + A) (unified)

Relocations for the Unified Descriptor Table (UDT) and Unified Function Table (UFT), used for CUDA Dynamic Parallelism and indirect function calls. R_MERCURY_UNIFIED (index 50) is a generic marker resolved to type 0 (no-op) before the relocation engine runs, because the unified table manager computes final offsets earlier in the pipeline.

The UNIFIED32_LO/UNIFIED32_HI pair (indices 62--63) is non-contiguous with the main unified block (50--59), placed after the ABS_PROG_REL types. Direct semantic equivalents of the R_CUDA UNIFIED* family.

Category Summary

CategoryIndicesCountComputationDescription
Sentinel0, 642--No-op / bounds marker
Global address11S + A64-bit global memory addresses
Absolute data2--65S + A (full / lo / hi)Data section and immediate addresses
PC-relative7--104(S + A) - PC (full / lo / hi)Branch / call targets
Texture / sampler / surface11--133Header index lookupBindable resource references
Clear141Write zerosUnused field cleanup
Function descriptor151S + AIndirect call targets
Byte-level16--238byte_n(S + A)Byte-granular data patching
Global byte-level24--318byte_n(S + A)Global address byte patching
Func desc byte-level32--398byte_n(S + A)Descriptor byte patching
Abs PC-relative40--41, 60--614|S + A - PC| (lo / hi / 32 / 64)Unsigned distance fields
PC-relative byte-level42--498byte_n((S + A) - PC)PC-relative byte patching
Unified table50--59, 62--6312S + A (generic / 32 / byte / lo / hi)UDT/UFT table references
Total--65----

R_CUDA Equivalence Summary

Of the 65 Mercury types, 50 have a direct R_CUDA semantic equivalent and 15 are Mercury-specific additions.

50 types with R_CUDA equivalents:

  • Sentinel: NONE, NONE_LAST (2)
  • Global: G64 (1)
  • Absolute: ABS64, ABS32, ABS16, ABS32_LO, ABS32_HI (5)
  • PC-relative: PROG_REL32 maps loosely to R_CUDA_PCREL_IMM24_* (1)
  • Texture/sampler/surface: TEX_HEADER_INDEX, SAMP_HEADER_INDEX, SURF_HEADER_INDEX (3)
  • Clear: UNUSED_CLEAR64 (1)
  • Function descriptor: FUNC_DESC_64 (1)
  • Byte-level: 8_* (8), G8_* (8), FUNC_DESC_8_* (8) = 24
  • Unified: UNIFIED, UNIFIED_32, UNIFIED_8_* (10), UNIFIED32_LO, UNIFIED32_HI = 12

15 Mercury-specific types (no R_CUDA counterpart):

Mercury-Specific TypeIndexSemantic Group
R_MERCURY_PROG_REL64764-bit PC-relative
R_MERCURY_PROG_REL32_LO9Split PC-relative
R_MERCURY_PROG_REL32_HI10Split PC-relative
R_MERCURY_ABS_PROG_REL32_LO40Absolute PC-relative
R_MERCURY_ABS_PROG_REL32_HI41Absolute PC-relative
R_MERCURY_PROG_REL8_042PC-relative byte-level
R_MERCURY_PROG_REL8_843PC-relative byte-level
R_MERCURY_PROG_REL8_1644PC-relative byte-level
R_MERCURY_PROG_REL8_2445PC-relative byte-level
R_MERCURY_PROG_REL8_3246PC-relative byte-level
R_MERCURY_PROG_REL8_4047PC-relative byte-level
R_MERCURY_PROG_REL8_4848PC-relative byte-level
R_MERCURY_PROG_REL8_5649PC-relative byte-level
R_MERCURY_ABS_PROG_REL3260Absolute PC-relative
R_MERCURY_ABS_PROG_REL6461Absolute PC-relative

The Mercury-specific types break into three families:

  1. PC-relative extensions (indices 7, 9--10, 42--49): 64-bit PC-relative, split 32-bit PC-relative, and a full byte-level PC-relative set. R_CUDA has only 24-bit immediate PC-relative (R_CUDA_PCREL_IMM24_23, R_CUDA_PCREL_IMM24_26).
  2. Absolute PC-relative (indices 40--41, 60--61): Unsigned distance computation (|S + A - PC|). No R_CUDA counterpart.
  3. Naming simplification (not counted above): Where R_CUDA encodes the bit-position in the type name (e.g., R_CUDA_ABS32_20, R_CUDA_ABS32_23, R_CUDA_ABS32_26, R_CUDA_ABS32_32 -- four types for the same semantic), Mercury uses a single position-independent type (e.g., R_MERCURY_ABS32). The bit-field position is encoded in the 64-byte descriptor, not the type name. This collapses 25 CUDA ABS*_<bitpos> instruction types into 5 Mercury ABS* types.

R_CUDA Categories Absent from R_MERCURY

R_CUDA CategoryR_CUDA CountReason for Omission
ABS*_<bitpos> (instruction field)25Position-independent R_MERCURY_ABS*
PCREL_IMM24_*2Replaced by PROG_REL32/64
CONST_FIELD*10Constant bank references handled differently in Mercury
BINDLESSOFF* / TEX_BINDLESSOFF*7Bindless mechanism redesigned for Mercury ISA
TEX_SLOT / SAMP_SLOT / SURF_SLOT3Header index only, no slots
SURF_HW_DESC / SURF_HW_SW_DESC2HW descriptor types eliminated
INSTRUCTION64 / INSTRUCTION1282Whole-instruction replacement not used in Mercury
YIELD_*2Yield conversion absent or handled differently
UNUSED_CLEAR321Mercury has 64-bit clear only
QUERY_DESC21_371Query descriptor absent
6_31 / 2_472Narrow-field types not needed
G321Mercury uses 64-bit global only
FUNC_DESC_32 / FUNC_DESC32_*1064-bit descriptor + byte-level only

Total: 68 R_CUDA types have no R_MERCURY counterpart, reducing 117 to 50 shared types.

String Table Details

The 65 primary name strings occupy a contiguous region at 0x1D35A17--0x1D35F5F (1,353 bytes). The strings are densely packed with no padding between entries (each string is null-terminated and the next string begins at the next byte).

First StringAddressLength
R_MERCURY_NONE0x1D35A1715 bytes + NUL
R_MERCURY_G640x1D35A2614 bytes + NUL
.........
R_MERCURY_NONE_LAST0x1D35F4C20 bytes + NUL

The R_CUDA name strings begin immediately after at 0x1D35F60 (R_CUDA_NONE), forming a single contiguous string pool for all relocation type names.

Trailing-Space Duplicates

Two additional strings with trailing spaces exist at separate .rodata addresses just before the Mercury descriptor table:

AddressStringSize
0x1D3CB71"R_MERCURY_UNIFIED_8_0 "22 bytes + NUL
0x1D3CB88"R_MERCURY_UNIFIED_8_8 "22 bytes + NUL

The corresponding R_CUDA trailing-space duplicates are adjacent:

AddressStringSize
0x1D3CB9F"R_CUDA_UNIFIED_8_0 "20 bytes + NUL
0x1D3CBB3"R_CUDA_UNIFIED_8_8 "20 bytes + NUL

All four trailing-space strings cluster at 0x1D3CB71--0x1D3CBC6, 26 bytes before the Mercury descriptor table at 0x1D3CBE0. These are formatting artifacts in .rodata -- name strings embedded within or adjacent to descriptor table entries, not distinct relocation types. Only the UNIFIED_8_0 and UNIFIED_8_8 entries have this artifact; the other 63 entries reference strings from the primary name pool.

EIATTR / EICOMPAT Attribute Names

Four additional Mercury-related strings appear outside the relocation name table:

AddressStringContext
0x1D36F31EIATTR_MERCURY_ISA_VERSION.nv.info attribute: Mercury ISA version
0x1D37170EIATTR_MERCURY_FINALIZER_OPTIONS.nv.info attribute: finalizer options
0x245EF08EICOMPAT_ATTR_MERCURY_ISA_MAJOR_MINOR_VERSIONCompatibility: major.minor ISA version
0x245EF38EICOMPAT_ATTR_MERCURY_ISA_PATCH_VERSIONCompatibility: patch-level ISA version

These are .nv.info section attribute names processed alongside relocations during the attribute handling phase, not relocation types themselves.

String accounting: 65 relocation names + 2 trailing-space duplicates + 4 EIATTR/EICOMPAT attributes = 71 total MERCURY-bearing strings in the binary.

Binary Addresses

StructureAddressSizeNotes
Mercury name tableoff_1D371E065 entries x 16 bytes = 1,040 bytesPointer + metadata per entry
Mercury descriptor tableoff_1D3CBE065 entries x 64 bytes = 4,160 bytes3 actions per entry
CUDA descriptor tableoff_1D3DBE0117 entries x 64 bytes = 7,488 bytesStarts at Mercury entry 64
Name string pool0x1D35A17--0x1D35F5F1,353 bytes65 null-terminated strings
Trailing-space strings0x1D3CB71--0x1D3CBC6~86 bytes4 strings (2 Mercury, 2 CUDA)
Application enginesub_46876014,322 bytesShared CUDA/Mercury
Validation functionsub_42F6C0~250 bytesShared CUDA/Mercury
Table limit0x41 (65)--Immediate constant in validation

Descriptor Table Overlap

The Mercury descriptor table's last entry (R_MERCURY_NONE_LAST at index 64, address 0x1D3DBE0) occupies the same 64 bytes as the CUDA descriptor table's first entry (R_CUDA_NONE at index 0, address 0x1D3DBE0). Both are sentinel no-op entries with identical all-zero descriptors. The binary exploits this by sharing the memory:

Mercury table:  [entry 0 ... entry 63] [entry 64 == CUDA entry 0]
                0x1D3CBE0              0x1D3DBE0
CUDA table:                            [entry 0 ... entry 116]
                                       0x1D3DBE0              0x1D3F920

This saves 64 bytes in .rodata by overlapping the Mercury end-sentinel with the CUDA start-sentinel.

Name Table Entry Format

Each entry in the name table at off_1D371E0 is 16 bytes (2 qwords = v7[2 * index] in sub_42F6C0):

+0  char*    name_ptr      // pointer to null-terminated name string
+8  uint32_t field_0       // metadata (used in validation: v8[2] == max_elf_class)
+12 uint32_t field_1       // metadata

The validation function accesses *((_DWORD *)v8 + 2) (offset +8, field_0) to compare against a2 (an ELF class parameter), rejecting relocations whose ELF class exceeds the maximum supported by that type. This is the per-type architecture compatibility check.

Cross-References

Internal (nvlink wiki):

  • R_MERCURY Relocations -- Semantic details, descriptor table structure, and dispatch logic for Mercury relocation types
  • Relocation Engine -- Shared CUDA/Mercury application engine (sub_468760) that processes both descriptor tables
  • R_CUDA Catalog -- The CUDA counterpart catalog with 117 relocation types
  • Mercury Overview -- High-level Mercury architecture context for the capsule Mercury binary format
  • Capsule Mercury Format -- Binary layout of the capmerc format that uses R_MERCURY relocations
  • Bindless Relocations -- Texture/surface relocation handling shared between CUDA and Mercury types

Sibling wikis:

  • ptxas: Relocations -- ptxas-side relocation emission that generates the R_MERCURY entries nvlink processes

Confidence Assessment

Spot-Check Table (12 entries)

All 12 spot-checked names found verbatim in nvlink_strings.json at their documented addresses:

EntryAddressVerified?
R_MERCURY_NONE0x1D35A17YES -- xrefs to 0x1D371E0 (name table), 0x1D3CBE0 (descriptor table)
R_MERCURY_G640x1D35A26YES
R_MERCURY_ABS640x1D35A34YES
R_MERCURY_ABS320x1D35A44YES
R_MERCURY_PROG_REL640x1D35A8AYES
R_MERCURY_TEX_HEADER_INDEX0x1D35AE4YES
R_MERCURY_FUNC_DESC_640x1D35B50YES
R_MERCURY_UNIFIED0x1D35E0FYES
R_MERCURY_NONE_LAST0x1D35F4CYES
R_MERCURY_UNIFIED32_HI0x1D35F35YES
R_MERCURY_8_00x1D35B67YES
R_MERCURY_FUNC_DESC_8_560x1D35D08YES

Per-Aspect Assessment

AspectConfidenceBasis
Type names (all 65 entries)HIGHAll 65 names found in nvlink_strings.json at contiguous addresses 0x1D35A17--0x1D35F4C; 12/12 spot-checked -- 0 failures
String addresses (all 65 entries)HIGHAddresses extracted directly from nvlink_strings.json addr field; verified contiguous and densely packed
Name table address (off_1D371E0)HIGHConfirmed in decompiled sub_42F6C0 (line 17: v7 = &off_1D371E0); Mercury branch with a1 -= 0x10000 at line 15
Name table entry size (16 bytes)HIGHStride v7[2 * a1] in sub_42F6C0 (line 29); 2 qwords = 16 bytes
Descriptor table address (off_1D3CBE0)HIGHReferenced in 8 decompiled files: sub_469620 line 41, sub_469790 line 40, sub_4699B0 line 71, sub_469B50 line 76, sub_469D60 lines 202/207, sub_4698A0 line 41, sub_46ADC0 line 146
Descriptor entry size (64 bytes)HIGHIndexing arithmetic 16 * v17 (16 DWORDs = 64 bytes) in sub_469790 line 40 and sub_4698A0 line 41
Entry count (65)HIGHBounded by R_MERCURY_NONE at index 0 and R_MERCURY_NONE_LAST at index 64; table limit 0x41 = 65 confirmed at sub_42F6C0 line 18
ELF encoding (index + 0x10000)HIGHa1 -= 0x10000 at sub_42F6C0 line 15; v7 = (unsigned int)(v17 - 0x10000) at sub_469620 line 40
Descriptor table overlap (Mercury[64] == CUDA[0])HIGH0x1D3CBE0 + 64*64 = 0x1D3DBE0 = off_1D3DBE0; arithmetic identity verified
R_CUDA equivalence mappingHIGHBased on semantic name comparison and identical descriptor action patterns for matching types
String table range (0x1D35A17--0x1D35F5F)HIGHFirst string at 0x1D35A17, last string R_MERCURY_NONE_LAST (20 bytes) starts at 0x1D35F4C, ends at 0x1D35F5F; R_CUDA starts at 0x1D35F60
Trailing-space duplicates (2 entries)HIGHVerified at 0x1D3CB71 and 0x1D3CB88 in string table
EIATTR/EICOMPAT attribute names (4)HIGHAll 4 found at documented addresses
Category computation formulasMEDIUMS + A and (S + A) - PC patterns inferred from relocation engine code analysis; not every type individually traced through the engine
Name table metadata fieldsMEDIUMField at offset +8 used in validation (v8[2] in sub_42F6C0); exact semantics of all metadata fields not fully decoded
Abs PC-relative computation (|S + A - PC|)MEDIUMInferred from name pattern ABS_PROG_REL; not individually traced through the application engine