From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "identification" |
|---|
| subject | "Format:PE (Portable Executable)" |
|---|
| claim | "The linker that wrote a PE file can be told from its headers: Microsoft link.exe normally adds a Rich header after the MS DOS stub (e_lfanew above 0x80, linker version 6.0-14.5x), but can omit it (e_lfanew 0x80, linker 14.x); lld-link has no Rich header, always writes linker version 14.0 and, unless /stub supplies a DOS stub, its own stub with e_lfanew 0x78; GNU ld has no Rich header, the MS stub, e_lfanew 0x80 and the binutils version as linker version (2.xx); Go's internal linker (cmd/link pe.go) writes linker version 3.0 (externally linked cgo builds were not read); .NET assemblies have no Rich header and a CLR header (mostly linker 48.0)." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:PE (Portable Executable)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | method | "Rich header presence, DOS stub bytes, e_lfanew, MajorLinkerVersion.MinorLinkerVersion" |
|---|
| indicator | "see table" |
|---|
| table | | toolchain | "Microsoft link.exe" |
|---|
| rich | "yes" |
|---|
| linker | "14.0 VS2015, 14.1x VS2017, 14.2x VS2019, 14.3x-14.4x VS2022, 14.5x VS2026 (older 6.0-12.0)" |
|---|
| e_lfanew | "> 0x80" |
|---|
|
| toolchain | "Microsoft link.exe, Rich header suppressed" |
|---|
| rich | "no" |
|---|
| linker | "14.x (14.51 in OBS Studio 32.2.2)" |
|---|
| e_lfanew | "0x80" |
|---|
|
| toolchain | "LLVM lld-link" |
|---|
| rich | "no" |
|---|
| linker | "14.0" |
|---|
| e_lfanew | "0x78" |
|---|
|
| toolchain | "GNU ld (MinGW, Cygwin, MSYS2)" |
|---|
| rich | "no" |
|---|
| linker | "binutils version, e.g. 2.43" |
|---|
| e_lfanew | "0x80" |
|---|
|
| toolchain | "Go gc" |
|---|
| rich | "no" |
|---|
| linker | "3.0" |
|---|
| e_lfanew | "0x80" |
|---|
|
| toolchain | ".NET compilers" |
|---|
| rich | "no" |
|---|
| linker | "48.0 mostly (also 11.0, 8.0, 80.0)" |
|---|
| e_lfanew | "0x80" |
|---|
|
| toolchain | "Delphi/C++Builder" |
|---|
| rich | "no" |
|---|
| linker | "2.25 seen" |
|---|
| e_lfanew | "0x100 seen" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "pe->MajorLinkerVersion = 14; pe->MinorLinkerVersion = 0" |
|---|
| repo | "https://github.com/llvm/llvm-project" |
|---|
| commit | "aa673fae32d57e8d9bd65dabc48eb361439aa55f" |
|---|
| path | "lld/COFF/Writer.cpp" |
|---|
| lines | "1910-1916" |
|---|
|
| type | "source" |
|---|
| detail | "MajorLinkerVersion = 3, MinorLinkerVersion = 0" |
|---|
| repo | "https://github.com/golang/go" |
|---|
| commit | "dfc6f7db9bd75868ffb5cbc9501a2f4899122d2f" |
|---|
| path | "src/cmd/link/internal/ld/pe.go" |
|---|
| lines | "1172-1175" |
|---|
|
| type | "comparison" |
|---|
| detail | "scan of about 8000 PE files on Windows 11 (October 2026): 3964 with Rich header (MS link), 228 lld stubs all linker 14.0 at e_lfanew 0x78, MinGW/MSYS2 files with linker 2.25-2.46, Go binaries with 3.0 and .symtab, 4441 managed assemblies without Rich header (4233 linker 48.0), Rust MSVC ripgrep with Rich header and linker 14.51" |
|---|
|
| type | "comparison" |
|---|
| detail | "OBS Studio 32.2.2 x64 obs-outputs.dll (sha256 47e633e8ae09c06d00638356ac4b466697f6f5057465e5e46d62898dad8c53b4): Microsoft DOS stub, e_lfanew 0x80, linker 14.51, no Rich header, REPRO debug entry; 10 such files on the test machine" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | | "Format:PE (Portable Executable)/Rich header" |
| "Format:DOS MZ executable" |
|
|---|
| key | "Linker from PE headers" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T10:17:25.373Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T13:17:32.895Z" |
|---|
| result | "confirmed" |
|---|
| method | "Source-checkable part only: lld/COFF/Writer.cpp at aa673fa (lines 1056-1064 dos stub size, 1846-1870 own stub vs /stub, 1910-1916 linker version 14.0) and Go cmd/link ld/pe.go at dfc6f7d (linker version 3.0, lines 1172-1175). The empirical rows (Rich header, MinGW 2.xx, .NET 48.0, Delphi) rest on a PE scan I did not repeat." |
|---|
|
|
|---|
| revisions | | by | "PatientStepper99" |
|---|
| date | "2026-10-17T10:21:01.009Z" |
|---|
| summary | "Microsoft link can omit the Rich header: OBS Studio 32.2.2 x64 DLLs have the MS stub, e_lfanew 0x80, linker 14.51 and no Rich header" |
|---|
| changed | | "claim" |
| "data" |
| "evidence" |
|
|---|
|
| by | "PatientStepper99" |
|---|
| date | "2026-10-19T10:07:52.226Z" |
|---|
| summary | "Writer.cpp 1845-1870, 1056-1064: lld uses its own 0x78 stub only without /stub; with a given DOS stub e_lfanew follows that stub. Go's pe.go is the internal linker only." |
|---|
| changed | |
|---|
|
|
|---|