Lines Matching +full:mach +full:- +full:o

30 // Original author: Jim Blandy <jimb@mozilla.com> <jimb@red-bean.com>
69 " nor a Mach-O object file\n", filename_.c_str()); in BadHeader()
87 // Fat binaries always use big-endian, so read the magic number in in Read()
88 // that endianness. To recognize Mach-O magic numbers, which can use in Read()
97 reporter_->TooShort(); in Read()
106 // Read this object file entry, byte-swapping as appropriate. in Read()
107 cursor >> objfile->cputype in Read()
108 >> objfile->cpusubtype in Read()
109 >> objfile->offset in Read()
110 >> objfile->size in Read()
111 >> objfile->align; in Read()
113 reporter_->TooShort(); in Read()
118 if (objfile->offset > fat_size || in Read()
119 objfile->size > fat_size - objfile->offset) { in Read()
120 reporter_->MisplacedObjectFile(); in Read()
128 // If this is a little-endian Mach-O file, fix the cursor's endianness. in Read()
134 // Get the cpu type and subtype from the Mach-O header. in Read()
137 reporter_->TooShort(); in Read()
143 // This alignment is correct for 32 and 64-bit x86 and ppc. in Read()
145 // http://www.opensource.apple.com/source/cctools/cctools-773/misc/lipo.c in Read()
152 reporter_->BadHeader(); in Read()
157 fprintf(stderr, "%s: file is not a Mach-O object file\n", filename_.c_str()); in BadHeader()
171 fprintf(stderr, "%s: file does not contain a complete Mach-O header\n", in HeaderTruncated()
177 " given in Mach-O header\n", filename_.c_str()); in LoadCommandRegionTruncated()
234 reporter_->HeaderTruncated(); in Read()
257 reporter_->UnsupportedCPUType(expected_cpu_type); in Read()
262 reporter_->BadHeader(); in Read()
267 // Since the byte cursor is in big-endian mode, a reversed magic number in Read()
268 // always indicates a little-endian file, regardless of our own endianness. in Read()
275 reporter_->BadHeader(); in Read()
285 reporter_->HeaderTruncated(); in Read()
292 reporter_->CPUTypeMismatch(cpu_type_, cpu_subtype_, in Read()
301 reporter_->LoadCommandRegionTruncated(); in Read()
319 // Read the command type and size --- fields common to all commands. in WalkLoadCommands()
322 reporter_->LoadCommandsOverrun(load_command_count_, index, 0); in WalkLoadCommands()
326 reporter_->LoadCommandsOverrun(load_command_count_, index, type); in WalkLoadCommands()
352 reporter_->LoadCommandTooShort(index, type); in WalkLoadCommands()
356 file_size > buffer_.Size() - file_offset) { in WalkLoadCommands()
357 reporter_->MisplacedSegmentData(segment.name); in WalkLoadCommands()
360 // Mach-O files in .dSYM bundles have the contents of the loaded in WalkLoadCommands()
374 if (!handler->SegmentCommand(segment)) in WalkLoadCommands()
383 reporter_->LoadCommandTooShort(index, type); in WalkLoadCommands()
392 if (symoff > buffer_.Size() || symbols_size > buffer_.Size() - symoff || in WalkLoadCommands()
393 stroff > buffer_.Size() || strsize > buffer_.Size() - stroff) { in WalkLoadCommands()
394 reporter_->MisplacedSymbolTable(); in WalkLoadCommands()
399 if (!handler->SymtabCommand(entries, names)) in WalkLoadCommands()
405 if (!handler->UnknownCommand(type, command)) in WalkLoadCommands()
479 reporter_->SectionsMissing(segment.name); in WalkSegmentSections()
483 // Zero-fill sections have a size, but no contents. in WalkSegmentSections()
487 // Mach-O files in .dSYM bundles have the contents of the loaded in WalkSegmentSections()
490 // non-zero sizes. There's no reason to call MisplacedSectionData in in WalkSegmentSections()
495 if (offset < size_t(segment.contents.start - buffer_.start) || in WalkSegmentSections()
496 offset > size_t(segment.contents.end - buffer_.start) || in WalkSegmentSections()
497 size > size_t(segment.contents.end - buffer_.start - offset)) { in WalkSegmentSections()
498 reporter_->MisplacedSectionData(section.section_name, in WalkSegmentSections()
505 if (!handler->HandleSection(section)) in WalkSegmentSections()
529 section_map->clear(); in MapSegmentSections()