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