Exemple #1
0
 public void LoadElfIdentification()
 {
     var rdr = new BeImageReader(base.RawImage, 0);
     var elfMagic = rdr.ReadBeInt32();
     if (elfMagic != ELF_MAGIC)
         throw new BadImageFormatException("File is not in ELF format.");
     this.fileClass = rdr.ReadByte();
     this.endianness = rdr.ReadByte();
     this.fileVersion = rdr.ReadByte();
     this.osAbi = rdr.ReadByte();
 }