Example #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);
            }
        }
Example #2
0
 public UniversalBinaryFile()
 {
     Header = new FatHeader();
 }
Example #3
0
 public static bool IsUniversalBinaryFile(byte[] buffer)
 {
     return(FatHeader.IsFatHeader(buffer));
 }