예제 #1
0
파일: Image.cs 프로젝트: NALSS/Telegraph
 internal Image()
 {
     m_dosHeader = new DOSHeader ();
     m_peFileHeader = new PEFileHeader ();
     m_peOptionalHeader = new PEOptionalHeader ();
     m_sections = new SectionCollection ();
     m_importAddressTable = new ImportAddressTable ();
     m_importTable = new ImportTable ();
     m_importLookupTable = new ImportLookupTable ();
     m_hintNameTable = new HintNameTable ();
     m_mdRoot = new MetadataRoot (this);
 }
예제 #2
0
		public override void VisitSectionCollection (SectionCollection coll)
		{
			Section text = new Section ();
			text.Name = Section.Text;
			text.Characteristics = SectionCharacteristics.ContainsCode |
				SectionCharacteristics.MemoryRead | SectionCharacteristics.MemExecute;
			m_image.TextSection = text;

			Section reloc = new Section ();
			reloc.Name =  Section.Relocs;
			reloc.Characteristics = SectionCharacteristics.ContainsInitializedData |
				SectionCharacteristics.MemDiscardable | SectionCharacteristics.MemoryRead;

			coll.Add (text);
			coll.Add (reloc);
		}
예제 #3
0
 public override void VisitSectionCollection(SectionCollection coll)
 {
     for (int i = 0; i < m_image.PEFileHeader.NumberOfSections; i++)
         coll.Add (new Section ());
 }