• Home
  • Raw
  • Download

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

15 # Mach header "magic" constants
23 # Mach haeder "filetype" constants
36 # Mach haeder "flag" constant bits
63 # Mach load command constants
106 # Mach CPU constants
136 # Values for nlist N_TYPE bits of the "Mach.NList.type" field.
143 # Section indexes for the "Mach.NList.sect_idx" fields
178 vm_prot_names = ['---', 'r--', '-w-', 'rw-', '--x', 'r-x', '-wx', 'rwx']
183 if hex_bytes_len == -1:
205 padding = num_per_line - ((i / 2) % num_per_line)
363 """Returns the unpack prefix that will for non-native endian-ness."""
420 class Mach: class
421 """Class that does everything mach-o related"""
424 """Class that implements mach-o architectures"""
471 ["ppc970-64", CPU_TYPE_POWERPC64, 100],
520 self.magic = Mach.Magic()
537 print("I/O error({0}): {1}".format(errno, strerror))
574 self.content = Mach.Skinny(self.path)
576 self.content = Mach.Universal(self.path)
610 self.magic = Mach.Magic()
614 self.file_off = self.file_off - 4
619 self.archs.append(Mach.Universal.ArchInfo())
622 self.archs[i].mach = Mach.Skinny(self.path)
624 skinny_magic = Mach.Magic()
626 self.archs[i].mach.unpack(data, skinny_magic)
635 … print("Universal Mach File: magic = %s, nfat_arch = %u" % (self.magic, self.nfat_arch))
645 self.archs[i].mach.dump(options)
651 self.archs[i].mach.dump_header(True, options)
658 self.archs[i].mach.dump_load_commands(True, options)
665 self.archs[i].mach.dump_sections(True, options)
670 self.archs[i].mach.dump_section_contents(options)
677 self.archs[i].mach.dump_symtab(True, options)
682 self.archs[i].mach.dump_symbol_names_matching_regex(
688 self.arch = Mach.Arch(0, 0)
692 self.mach = None
703 print("---------- ---------- ---------- ---------- ----------")
706 print("---------- ---------- ---------- ----------")
712 … print("%-10s %#8.8x %#8.8x %#8.8x" % (self.arch, self.offset, self.size, self.align))
722 return "Mach.Universal.ArchInfo: %#8.8x %#8.8x %#8.8x %#8.8x %#8.8x" % (
726 return "Mach.Universal.ArchInfo: %#8.8x %#8.8x %#8.8x %#8.8x %#8.8x" % (
788 s = s[0:-2]
818 self.arch = Mach.Arch(0, 0)
819 self.filetype = Mach.FileType(0)
822 self.flags = Mach.Flags(0)
828 self.sections.append(Mach.Section())
837 self.magic = Mach.Magic()
841 self.file_off = self.file_off - 4
861 lc = Mach.LoadCommand()
866 lc = Mach.SegmentLoadCommand(lc)
872 lc = Mach.DylibLoadCommand(lc)
881 lc = Mach.LoadDYLDLoadCommand(lc)
884 lc = Mach.DYLDInfoOnlyLoadCommand(lc)
887 lc = Mach.SymtabLoadCommand(lc)
890 lc = Mach.DYLDSymtabLoadCommand(lc)
893 lc = Mach.UUIDLoadCommand(lc)
898 lc = Mach.DataBlobLoadCommand(lc)
901 lc = Mach.UnixThreadLoadCommand(lc)
904 lc = Mach.EncryptionInfoLoadCommand(lc)
968 …print('error: comparing a %s mach-o file with a %s mach-o file is not supported' % (self.type, rhs…
971 print('error: mach files differ')
977 print("---------- ---------- ---------- ---------- -------- ---------- ----------")
980 print("------------ ---------- -------------- -------- ---------- ----------")
986 …print("%-12s %-10s %-14s %#8u %#8.8x %s" % (self.magic, self.arch, self.filetype, self.ncmds, self…
1009 print("Mach Header")
1055 # print "Extracting modules from mach file..."
1117 symtab_offset = linkedit_vmaddr + lc_symtab.symoff - linkedit_fileoff
1118 symtab_offset = linkedit_vmaddr + lc_symtab.stroff - linkedit_fileoff
1125 nlist = Mach.NList()
1198 def __init__(self, c=None, l=0, o=0): argument
1202 self.command = Mach.LoadCommand.Command(0)
1204 self.file_off = o
1215 return '%#8.8x: <%#4.4x> %-24s' % (self.file_off,
1252 …= ------------------ ------------------ ---------- ---------- ---------- ---------- ---------- ---…
1255 …print("===== ---------- ---------- ---------- ---------- ---------- ---------- ---------- --------…
1284 Mach.LoadCommand.__init__(self, lc.command, lc.length, lc.file_off)
1295 self.name = data.get_fixed_length_c_string(self.length - 24)
1298 s = Mach.LoadCommand.__str__(self)
1308 Mach.LoadCommand.__init__(self, lc.command, lc.length, lc.file_off)
1313 self.name = data.get_fixed_length_c_string(self.length - 12)
1316 s = Mach.LoadCommand.__str__(self)
1345 Mach.LoadCommand.__init__(self, lc.command, lc.length, lc.file_off)
1349 reg_set = Mach.UnixThreadLoadCommand.ThreadState()
1354 s = Mach.LoadCommand.__str__(self)
1362 Mach.LoadCommand.__init__(self, lc.command, lc.length, lc.file_off)
1380 s = Mach.LoadCommand.__str__(self)
1396 Mach.LoadCommand.__init__(self, lc.command, lc.length, lc.file_off)
1422 s = Mach.LoadCommand.__str__(self)
1433 s += "ilocalsym = %-10u, nlocalsym = %u\n" % (
1435 …s += " iextdefsym = %-10u, nextdefsym = %u\n" %…
1437 …s += " iundefsym = %-10u, nundefsym = %u\n" %…
1456 Mach.LoadCommand.__init__(self, lc.command, lc.length, lc.file_off)
1468 s = Mach.LoadCommand.__str__(self)
1476 Mach.LoadCommand.__init__(self, lc.command, lc.length, lc.file_off)
1488 s = Mach.LoadCommand.__str__(self)
1495 Mach.LoadCommand.__init__(self, lc.command, lc.length, lc.file_off)
1504 s = Mach.LoadCommand.__str__(self)
1512 Mach.LoadCommand.__init__(self, lc.command, lc.length, lc.file_off)
1522 s = Mach.LoadCommand.__str__(self)
1523 s += "file-range = [%#8.8x - %#8.8x), cryptsize = %u, cryptid = %u" % (
1530 Mach.LoadCommand.__init__(self, lc.command, lc.length, lc.file_off)
1554 section = Mach.Section()
1560 s = Mach.LoadCommand.__str__(self)
1618 stab = Mach.NList.Type.Stab(self.value)
1645 self.type = Mach.NList.Type()
1671 return '%#8.8x %#2.2x (%-20s) %#2.2x %#4.4x %16.16x%s' % (self.name_offset,
1675 '''Interactive command interpreter to mach-o files.'''
1677 def __init__(self, mach, options): argument
1679 self.intro = 'Interactive mach-o command interpreter'
1680 self.prompt = 'mach-o: %s %% ' % mach.path
1681 self.mach = mach
1698 '''Dump mach-o file headers'''
1699 self.mach.dump_header(True, self.options)
1703 '''Dump all mach-o load commands'''
1704 self.mach.dump_load_commands(True, self.options)
1708 '''Dump all mach-o sections'''
1709 self.mach.dump_sections(True, self.options)
1713 '''Dump all mach-o symbols in the symbol table'''
1714 self.mach.dump_symtab(True, self.options)
1719 description='A script that parses skinny and universal mach-o files.')
1721 '--arch',
1722 '-a',
1729 '-v',
1730 '--verbose',
1736 '-H',
1737 '--header',
1740 help='dump the mach-o file header',
1743 '-l',
1744 '--load-commands',
1747 help='dump the mach-o load commands',
1750 '-s',
1751 '--symtab',
1754 help='dump the mach-o symbol table',
1757 '-S',
1758 '--sections',
1761 help='dump the mach-o sections',
1764 '--section',
1772 '-o',
1773 '--out',
1776 …help='Used in conjunction with the --section=NAME option to save a single section\'s data to disk.…
1779 '-i',
1780 '--interactive',
1786 '-m',
1787 '--mangled',
1790 help='dump all mangled names in a mach file',
1793 '-c',
1794 '--compare',
1797 help='compare two mach files',
1800 '-M',
1801 '--extract-modules',
1807 '-C',
1808 '--count',
1812 default=-1)
1817 print("error: can't use --section option with the --extract-modules option")
1820 … print("error: the --output=FILE option must be specified with the --extract-modules option")
1825 mach_a = Mach()
1826 mach_b = Mach()
1831 print('error: --compare takes two mach files as arguments')
1840 mach = Mach() variable
1841 mach.parse(path)
1843 interpreter = Mach.Interactive(mach, options)
1846 mach.dump(options)