From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:.NET single-file bundle" |
|---|
| claim | "The bundler aligns each embedded assembly to 4096 bytes for Windows and for Linux/macOS ARM64 targets, 16384 for LoongArch64 and 64 otherwise (so R2R code can be memory-mapped); other files are packed without alignment. Compression (bundle version 6+) is used per file only when it saves enough space." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:.NET single-file bundle" |
|---|
| observed_in | |
|---|
|
|---|
| data | | effect | "assembly offsets are multiples of the alignment" |
|---|
| condition | "target OS/architecture of the publish" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "AssemblyAlignment per OS/arch" |
|---|
| repo | "https://github.com/dotnet/runtime" |
|---|
| commit | "d80abfc4b04f85722596e8d83af7f9a61dcf49da" |
|---|
| path | "src/installer/managed/Microsoft.NET.HostModel/Bundle/TargetInfo.cs" |
|---|
| lines | "58-81" |
|---|
|
| type | "source" |
|---|
| detail | "DeflateStream compression, 'compression rate was not good enough' fallback, padding to AssemblyAlignment" |
|---|
| repo | "https://github.com/dotnet/runtime" |
|---|
| commit | "d80abfc4b04f85722596e8d83af7f9a61dcf49da" |
|---|
| path | "src/installer/managed/Microsoft.NET.HostModel/Bundle/Bundler.cs" |
|---|
| lines | "105-140" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "Windows x64 bundles: assembly offsets 0x25000, 0x939000, 0x94E000 ... (multiples of 0x1000); json entries at 0x26400 and 0x26604" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Assembly alignment in bundles" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T15:23:47.423Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T01:30:48.087Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read dotnet/runtime TargetInfo.cs at d80abfc: Windows 4096, LoongArch64 16384, Arm64 (Unix) 4096, otherwise 64." |
|---|
|
|
|---|