1 write to Header
System.Reflection.Metadata (1)
System\Reflection\PortableExecutable\PEBuilder.cs (1)
70
Header
= header;
47 references to Header
System.Reflection.Metadata (47)
System\Reflection\PortableExecutable\ManagedPEBuilder.cs (6)
104
if (
Header
.Machine == Machine.I386 ||
Header
.Machine == 0)
129
imageCharacteristics:
Header
.ImageCharacteristics,
130
machine:
Header
.Machine,
168
Header
.ImageBase,
199
WriteRelocationSection(sectionBuilder,
Header
.Machine, _lazyEntryPointAddress);
System\Reflection\PortableExecutable\PEBuilder.cs (41)
105
builder.Align(
Header
.FileAlignment);
110
builder.Align(
Header
.FileAlignment);
127
int sizeOfPeHeaders =
Header
.ComputeSizeOfPEHeaders(sections.Length);
129
var nextRva = BitArithmetic.Align(sizeOfPeHeaders,
Header
.SectionAlignment);
130
var nextPointer = BitArithmetic.Align(sizeOfPeHeaders,
Header
.FileAlignment);
141
sizeOfRawData: BitArithmetic.Align(builder.Count,
Header
.FileAlignment),
146
nextRva = BitArithmetic.Align(serialized.RelativeVirtualAddress + serialized.VirtualSize,
Header
.SectionAlignment);
195
builder.WriteUInt16((ushort)(
Header
.Machine == 0 ? Machine.I386 :
Header
.Machine));
216
builder.WriteUInt16((ushort)PEHeader.Size(
Header
.Is32Bit));
219
builder.WriteUInt16((ushort)
Header
.ImageCharacteristics);
224
builder.WriteUInt16((ushort)(
Header
.Is32Bit ? PEMagic.PE32 : PEMagic.PE32Plus));
225
builder.WriteByte(
Header
.MajorLinkerVersion);
226
builder.WriteByte(
Header
.MinorLinkerVersion);
244
if (
Header
.Is32Bit)
250
builder.WriteUInt32((uint)
Header
.ImageBase);
254
builder.WriteUInt64(
Header
.ImageBase);
258
builder.WriteUInt32((uint)
Header
.SectionAlignment);
259
builder.WriteUInt32((uint)
Header
.FileAlignment);
260
builder.WriteUInt16(
Header
.MajorOperatingSystemVersion);
261
builder.WriteUInt16(
Header
.MinorOperatingSystemVersion);
262
builder.WriteUInt16(
Header
.MajorImageVersion);
263
builder.WriteUInt16(
Header
.MinorImageVersion);
264
builder.WriteUInt16(
Header
.MajorSubsystemVersion);
265
builder.WriteUInt16(
Header
.MinorSubsystemVersion);
272
builder.WriteUInt32((uint)BitArithmetic.Align(lastSection.RelativeVirtualAddress + lastSection.VirtualSize,
Header
.SectionAlignment));
275
builder.WriteUInt32((uint)BitArithmetic.Align(
Header
.ComputeSizeOfPEHeaders(sections.Length),
Header
.FileAlignment));
282
builder.WriteUInt16((ushort)
Header
.Subsystem);
283
builder.WriteUInt16((ushort)
Header
.DllCharacteristics);
285
if (
Header
.Is32Bit)
287
builder.WriteUInt32((uint)
Header
.SizeOfStackReserve);
288
builder.WriteUInt32((uint)
Header
.SizeOfStackCommit);
289
builder.WriteUInt32((uint)
Header
.SizeOfHeapReserve);
290
builder.WriteUInt32((uint)
Header
.SizeOfHeapCommit);
294
builder.WriteUInt64(
Header
.SizeOfStackReserve);
295
builder.WriteUInt64(
Header
.SizeOfStackCommit);
296
builder.WriteUInt64(
Header
.SizeOfHeapReserve);
297
builder.WriteUInt64(
Header
.SizeOfHeapCommit);
500
int peHeadersSize =
Header
.ComputeSizeOfPEHeaders(GetSections().Length);
501
byte[] signature = signatureProvider(GetContentToSign(peImage, peHeadersSize,
Header
.FileAlignment, strongNameSignatureFixup));