コード例 #1
0
        public UniversalBinaryFile(byte[] buffer)
        {
            Header = new FatHeader(buffer);

            List <FatArch> architectures = new List <FatArch>();

            for (int index = 0; index < Header.NumberOfArchitectures; index++)
            {
                FatArch architecture = new FatArch(buffer, FatHeader.Length + index * FatArch.Length);
                architectures.Add(architecture);
            }

            foreach (FatArch architecture in architectures)
            {
                MachObjectFile machObject = new MachObjectFile(buffer, (int)architecture.Offset, (int)architecture.Size);
                Architectures.Add(architecture, machObject);
            }
        }
コード例 #2
0
 public UniversalBinaryFile()
 {
     Header = new FatHeader();
 }
コード例 #3
0
 public static bool IsUniversalBinaryFile(byte[] buffer)
 {
     return(FatHeader.IsFatHeader(buffer));
 }