public short ReadCoffHeader(ImageReader rdr) { this.machine = rdr.ReadLeUInt16(); short expectedMagic = GetExpectedMagic(machine); arch = CreateArchitecture(machine); platform = CreatePlatform(machine, Services, arch); innerLoader = CreateInnerLoader(machine); sections = rdr.ReadLeInt16(); rdr.ReadLeUInt32(); // timestamp. rdr.ReadLeUInt32(); // COFF symbol table. rdr.ReadLeUInt32(); // #of symbols. optionalHeaderSize = rdr.ReadLeInt16(); short fileFlags = rdr.ReadLeInt16(); rvaSectionTable = (uint) ((int)rdr.Offset + optionalHeaderSize); return expectedMagic; }
public short ReadCoffHeader(ImageReader rdr) { this.machine = rdr.ReadLeUInt16(); short expectedMagic = GetExpectedMagic(machine); arch = CreateArchitecture(machine); platform = CreatePlatform(machine, Services, arch); innerLoader = CreateInnerLoader(machine); sections = rdr.ReadLeInt16(); rdr.ReadLeUInt32(); // timestamp. rdr.ReadLeUInt32(); // COFF symbol table. rdr.ReadLeUInt32(); // #of symbols. optionalHeaderSize = rdr.ReadLeInt16(); this.fileFlags = rdr.ReadLeUInt16(); rvaSectionTable = (uint) ((int)rdr.Offset + optionalHeaderSize); return expectedMagic; }