Lines Matching refs:MachO
117 static void PrintDarwinSectionSizes(MachOObjectFile *MachO) { in PrintDarwinSectionSizes() argument
125 uint32_t LoadCommandCount = MachO->getHeader().ncmds; in PrintDarwinSectionSizes()
126 uint32_t Filetype = MachO->getHeader().filetype; in PrintDarwinSectionSizes()
127 MachOObjectFile::LoadCommandInfo Load = MachO->getFirstLoadCommandInfo(); in PrintDarwinSectionSizes()
131 if (Load.C.cmd == MachO::LC_SEGMENT_64) { in PrintDarwinSectionSizes()
132 MachO::segment_command_64 Seg = MachO->getSegment64LoadCommand(Load); in PrintDarwinSectionSizes()
142 MachO::section_64 Sec = MachO->getSection64(Load, J); in PrintDarwinSectionSizes()
143 if (Filetype == MachO::MH_OBJECT) in PrintDarwinSectionSizes()
157 } else if (Load.C.cmd == MachO::LC_SEGMENT) { in PrintDarwinSectionSizes()
158 MachO::segment_command Seg = MachO->getSegmentLoadCommand(Load); in PrintDarwinSectionSizes()
168 MachO::section Sec = MachO->getSection(Load, J); in PrintDarwinSectionSizes()
169 if (Filetype == MachO::MH_OBJECT) in PrintDarwinSectionSizes()
187 Load = MachO->getNextLoadCommandInfo(Load); in PrintDarwinSectionSizes()
196 static void PrintDarwinSegmentSizes(MachOObjectFile *MachO) { in PrintDarwinSegmentSizes() argument
197 uint32_t LoadCommandCount = MachO->getHeader().ncmds; in PrintDarwinSegmentSizes()
198 MachOObjectFile::LoadCommandInfo Load = MachO->getFirstLoadCommandInfo(); in PrintDarwinSegmentSizes()
205 if (Load.C.cmd == MachO::LC_SEGMENT_64) { in PrintDarwinSegmentSizes()
206 MachO::segment_command_64 Seg = MachO->getSegment64LoadCommand(Load); in PrintDarwinSegmentSizes()
207 if (MachO->getHeader().filetype == MachO::MH_OBJECT) { in PrintDarwinSegmentSizes()
209 MachO::section_64 Sec = MachO->getSection64(Load, J); in PrintDarwinSegmentSizes()
231 } else if (Load.C.cmd == MachO::LC_SEGMENT) { in PrintDarwinSegmentSizes()
232 MachO::segment_command Seg = MachO->getSegmentLoadCommand(Load); in PrintDarwinSegmentSizes()
233 if (MachO->getHeader().filetype == MachO::MH_OBJECT) { in PrintDarwinSegmentSizes()
235 MachO::section Sec = MachO->getSection(Load, J); in PrintDarwinSegmentSizes()
261 Load = MachO->getNextLoadCommandInfo(Load); in PrintDarwinSegmentSizes()
286 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(Obj); in PrintObjectSectionSizes() local
287 if (OutputFormat == darwin && MachO) in PrintObjectSectionSizes()
288 PrintDarwinSectionSizes(MachO); in PrintObjectSectionSizes()
291 else if (MachO && OutputFormat == berkeley) in PrintObjectSectionSizes()
292 PrintDarwinSegmentSizes(MachO); in PrintObjectSectionSizes()
399 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o); in checkMachOAndArchFlags() local
401 MachO::mach_header H; in checkMachOAndArchFlags()
402 MachO::mach_header_64 H_64; in checkMachOAndArchFlags()
404 if (MachO->is64Bit()) { in checkMachOAndArchFlags()
405 H_64 = MachO->MachOObjectFile::getHeader64(); in checkMachOAndArchFlags()
408 H = MachO->MachOObjectFile::getHeader(); in checkMachOAndArchFlags()
457 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o); in PrintFileSectionSizes() local
462 else if (MachO && OutputFormat == darwin) in PrintFileSectionSizes()
466 if (MachO) in PrintFileSectionSizes()
489 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o); in PrintFileSectionSizes() local
492 else if (MachO && OutputFormat == darwin) { in PrintFileSectionSizes()
499 if (!MachO || moreThanOneFile || ArchFlags.size() > 1) in PrintFileSectionSizes()
520 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o); in PrintFileSectionSizes() local
524 else if (MachO && OutputFormat == darwin) in PrintFileSectionSizes()
531 if (MachO) { in PrintFileSectionSizes()
566 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o); in PrintFileSectionSizes() local
569 else if (MachO && OutputFormat == darwin) { in PrintFileSectionSizes()
576 if (!MachO || moreThanOneFile) in PrintFileSectionSizes()
597 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o); in PrintFileSectionSizes() local
601 else if (MachO && OutputFormat == darwin) in PrintFileSectionSizes()
607 if (MachO) in PrintFileSectionSizes()
630 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o); in PrintFileSectionSizes() local
633 else if (MachO && OutputFormat == darwin) { in PrintFileSectionSizes()
641 if (!MachO || moreThanOneFile || moreThanOneArch) in PrintFileSectionSizes()
660 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o); in PrintFileSectionSizes() local
664 else if (MachO && OutputFormat == darwin) in PrintFileSectionSizes()
669 if (MachO) in PrintFileSectionSizes()
688 MachOObjectFile *MachO = dyn_cast<MachOObjectFile>(o); in PrintFileSectionSizes() local
689 if (!MachO || moreThanOneFile) in PrintFileSectionSizes()