87 references to PEHeaders
BuildValidator (10)
PEReaderExtensions.cs (5)
22Debug.Assert(peReader.PEHeaders is object); 23Debug.Assert(peReader.PEHeaders.PEHeader is object); 27DirectoryEntry exportTable = peReader.PEHeaders.PEHeader.ExportTableDirectory; 111int index = reader.PEHeaders.GetContainingSectionIndex(rva); 116SectionHeader containingSection = reader.PEHeaders.SectionHeaders[index];
Util.cs (5)
88if (peReader.PEHeaders is null || 89peReader.PEHeaders.PEHeader is null || 90peReader.PEHeaders.CorHeader is null) 95if ((peReader.PEHeaders.CorHeader.Flags & CorFlags.ILLibrary) == 0) 102return peReader.PEHeaders.CorHeader.ManagedNativeHeaderDirectory.Size != 0;
Crossgen2Tasks (5)
PrepareForReadyToRunCompilation.cs (5)
338if (peReader.PEHeaders == null) 341if (peReader.PEHeaders.CorHeader == null) 344if ((peReader.PEHeaders.CorHeader.Flags & CorFlags.ILLibrary) == 0) 351return peReader.PEHeaders.CorHeader.ManagedNativeHeaderDirectory.Size != 0; 390if ((pereader.PEHeaders.CorHeader.Flags & CorFlags.ILOnly) != CorFlags.ILOnly)
Microsoft.Build.Tasks.Core (4)
ManifestUtil\MetadataReader.cs (4)
191if (_peReader.PEHeaders == null || 192_peReader.PEHeaders.CoffHeader == null) 197Machine machine = _peReader.PEHeaders.CoffHeader.Machine; 198CorHeader corHeader = _peReader.PEHeaders.CorHeader;
Microsoft.CodeAnalysis (5)
MetadataReader\PEModule.cs (3)
304return _peReaderOpt.PEHeaders.IsCoffOnly; 321return _peReaderOpt.PEHeaders.CoffHeader.Machine; 338return (_peReaderOpt.PEHeaders.CorHeader.Flags & CorFlags.Requires32Bit) != 0;
PEWriter\MetadataWriter.PortablePdb.cs (2)
1001builder.WriteInt32(peReader.PEHeaders.CoffHeader.TimeDateStamp); 1002builder.WriteInt32(peReader.PEHeaders.PEHeader.SizeOfImage);
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
12306var debugDirectory = peReader.PEHeaders.PEHeader.DebugTableDirectory;
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (7)
Emit\CompilationEmitTests.cs (2)
659peReader.PEHeaders.SectionHeaders.Select(h => h.Name)); 1950var flags = reader.PEHeaders.CorHeader.Flags;
Emit\DeterministicTests.cs (4)
159Assert.Equal(Machine.Amd64, peReader1.PEHeaders.CoffHeader.Machine); 160Assert.Equal(Machine.Arm64, peReader2.PEHeaders.CoffHeader.Machine); 161Assert.NotEqual(peReader1.PEHeaders.CoffHeader.TimeDateStamp, peReader2.PEHeaders.CoffHeader.TimeDateStamp);
Emit\EmitMetadataTests.cs (1)
2240var peHeaders = peReader.PEHeaders;
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
PDB\PDBTests.cs (2)
661int peEntryPointToken = peReader.PEHeaders.CorHeader.EntryPointTokenOrRelativeVirtualAddress; 684int peEntryPointToken = peReader.PEHeaders.CorHeader.EntryPointTokenOrRelativeVirtualAddress;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (1)
Attributes\InternalsVisibleToAndStrongNameTests.cs (1)
596var flags = reader.PEHeaders.CorHeader.Flags;
Microsoft.CodeAnalysis.Features (1)
Emit\CompilationOutputs.cs (1)
56peHeaders = peReader.PEHeaders;
Microsoft.CodeAnalysis.Rebuild (3)
CompilationFactory.cs (1)
105var peHeader = OptionsReader.PeReader.PEHeaders.PEHeader!;
CompilationOptionsReader.cs (2)
262if (PeReader.PEHeaders.CorHeader is not { } corHeader 263|| !PeReader.PEHeaders.TryGetDirectoryOffset(corHeader.ResourcesDirectory, out var resourcesOffset))
Microsoft.CodeAnalysis.Test.Utilities (4)
Metadata\DynamicAnalysisDataReader.cs (2)
164var resourcesDir = peReader.PEHeaders.CorHeader.ResourcesDirectory; 170if (!peReader.PEHeaders.TryGetDirectoryOffset(resourcesDir, out var start))
PDB\TestMetadataReferenceInfo.cs (2)
43_peReader.PEHeaders.CoffHeader.TimeDateStamp, 44_peReader.PEHeaders.PEHeader.SizeOfImage,
Microsoft.CodeAnalysis.VisualBasic.CommandLine.UnitTests (1)
CommandLineTests.vb (1)
9718Dim debugDirectory = peReader.PEHeaders.PEHeader.DebugTableDirectory
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (6)
Attributes\InternalsVisibleToAndStrongNameTests.vb (4)
394Assert.Equal(CorFlags.ILOnly, Metadata.Module.PEReaderOpt.PEHeaders.CorHeader.Flags) 427Assert.Equal(CorFlags.ILOnly Or CorFlags.StrongNameSigned, Metadata.Module.PEReaderOpt.PEHeaders.CorHeader.Flags) 1416Dim flags = metadata.Module.PEReaderOpt.PEHeaders.CorHeader.Flags 1970Dim flags = reader.PEHeaders.CorHeader.Flags
PDB\PDBTests.vb (2)
122Dim peEntryPointToken = peReader.PEHeaders.CorHeader.EntryPointTokenOrRelativeVirtualAddress 152Dim peEntryPointToken = peReader.PEHeaders.CorHeader.EntryPointTokenOrRelativeVirtualAddress
Microsoft.DotNet.Arcade.Sdk (4)
src\SetCorFlags.cs (2)
83var newFlags = (reader.PEHeaders.CorHeader.Flags & ~removeFlags) | addFlags; 88stream.Position = reader.PEHeaders.CorHeaderStartOffset + OffsetFromStartOfCorHeaderToFlags;
src\Unsign.cs (2)
50var headers = peReader.PEHeaders; 60stream.Position = peReader.PEHeaders.PEHeaderStartOffset + certificateTableDirectoryOffset;
Microsoft.DotNet.GenFacades (4)
ClearAssemblyReferenceVersions.cs (4)
42stream.Position = peReader.PEHeaders.MetadataStartOffset + assemblyRefOffset + assemblyRefRow * sizeAssemblyRefRow; 52if (peReader.PEHeaders.PEHeader.CertificateTableDirectory.Size != 0) 55int certificateTableDirectoryOffset = (peReader.PEHeaders.PEHeader.Magic == PEMagic.PE32Plus) ? 144 : 128; 56stream.Position = peReader.PEHeaders.PEHeaderStartOffset + certificateTableDirectoryOffset;
Microsoft.DotNet.SignTool (6)
src\ContentUtil.cs (4)
65CorHeader header = peReader.PEHeaders.CorHeader; 76return peReader.PEHeaders.CorHeader != null; 92return ((int)peReader.PEHeaders.CorHeader.Flags & CROSSGEN_FLAG) == CROSSGEN_FLAG; 100var headers = peReader.PEHeaders;
src\RealSignTool.cs (2)
93stream.Position = peReader.PEHeaders.CorHeaderStartOffset + OffsetFromStartOfCorHeaderToFlags; 94writer.Write((UInt32)(peReader.PEHeaders.CorHeader.Flags & ~CorFlags.StrongNameSigned));
SemanticSearch.BuildTask (3)
GenerateFilteredReferenceAssembliesTask.cs (3)
295var headers = peReader.PEHeaders; 299var metadataOffset = peReader.PEHeaders.MetadataStartOffset; 326writableStream.Position = peReader.PEHeaders.PEHeaderStartOffset + certificateTableDirectoryOffset;
System.Diagnostics.FileVersionInfo (1)
System\Diagnostics\FileVersionInfo.Unix.cs (1)
57LoadManagedAssemblyMetadata(metadataReader, peReader.PEHeaders.IsExe);
System.Reflection.Metadata (16)
System\Reflection\PortableExecutable\PEReader.cs (16)
368var newBlock = GetPEImage().GetMemoryBlock(PEHeaders.MetadataStartOffset, PEHeaders.MetadataSize); 383Debug.Assert(index >= 0 && index < PEHeaders.SectionHeaders.Length); 389Interlocked.CompareExchange(ref _lazyPESectionBlocks, new AbstractMemoryBlock[PEHeaders.SectionHeaders.Length], null); 402PEHeaders.SectionHeaders[index].VirtualAddress, 403PEHeaders.SectionHeaders[index].VirtualSize); 417PEHeaders.SectionHeaders[index].VirtualSize, 418PEHeaders.SectionHeaders[index].SizeOfRawData); 420newBlock = peImage.GetMemoryBlock(PEHeaders.SectionHeaders[index].PointerToRawData, size); 456get { return PEHeaders.MetadataSize > 0; } 489int sectionIndex = PEHeaders.GetContainingSectionIndex(relativeVirtualAddress); 497int relativeOffset = relativeVirtualAddress - PEHeaders.SectionHeaders[sectionIndex].VirtualAddress; 522int sectionIndex = PEHeaders.IndexOfSection(sectionName); 539Debug.Assert(PEHeaders.PEHeader != null); 541var debugDirectory = PEHeaders.PEHeader.DebugTableDirectory; 548if (!PEHeaders.TryGetDirectoryOffset(debugDirectory, out position))
System.Reflection.MetadataLoadContext (3)
System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.cs (2)
51PEHeaders peHeaders = PEReader.PEHeaders; 89PEHeaders peHeaders = PEReader.PEHeaders;
System\Reflection\TypeLoading\Modules\Ecma\EcmaModule.ManifestResources.cs (1)
34PEMemoryBlock resourceDirectory = pe.GetSectionData(pe.PEHeaders.CorHeader!.ResourcesDirectory.RelativeVirtualAddress);