Class: OdinFlex::MachO::Header

Inherits:
Struct
  • Object
show all
Includes:
SectionTypes
Defined in:
lib/odinflex/mach-o.rb

Constant Summary collapse

MH_OBJECT =
0x1
MH_EXECUTE =
0x2
MH_FVMLIB =
0x3
MH_CORE =
0x4
MH_PRELOAD =
0x5
MH_DYLIB =
0x6
MH_DYLINKER =
0x7
MH_BUNDLE =
0x8
MH_DYLIB_STUB =
0x9
MH_DSYM =
0xa
MH_KEXT_BUNDLE =
0xb
MH_FILESET =
0xc
SIZEOF =

8 * (32 bit int)

8 * 4

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SectionTypes

#command?, #dysymtab?, #section?, #segment?, #symtab?

Instance Attribute Details

#cpusubtypeObject

Returns the value of attribute cpusubtype

Returns:

  • (Object)

    the current value of cpusubtype



28
29
30
# File 'lib/odinflex/mach-o.rb', line 28

def cpusubtype
  @cpusubtype
end

#cputypeObject

Returns the value of attribute cputype

Returns:

  • (Object)

    the current value of cputype



28
29
30
# File 'lib/odinflex/mach-o.rb', line 28

def cputype
  @cputype
end

#filetypeObject

Returns the value of attribute filetype

Returns:

  • (Object)

    the current value of filetype



28
29
30
# File 'lib/odinflex/mach-o.rb', line 28

def filetype
  @filetype
end

#flagsObject

Returns the value of attribute flags

Returns:

  • (Object)

    the current value of flags



28
29
30
# File 'lib/odinflex/mach-o.rb', line 28

def flags
  @flags
end

#magicObject

Returns the value of attribute magic

Returns:

  • (Object)

    the current value of magic



28
29
30
# File 'lib/odinflex/mach-o.rb', line 28

def magic
  @magic
end

#ncmdsObject

Returns the value of attribute ncmds

Returns:

  • (Object)

    the current value of ncmds



28
29
30
# File 'lib/odinflex/mach-o.rb', line 28

def ncmds
  @ncmds
end

#reservedObject

Returns the value of attribute reserved

Returns:

  • (Object)

    the current value of reserved



28
29
30
# File 'lib/odinflex/mach-o.rb', line 28

def reserved
  @reserved
end

#sizeofcmdsObject

Returns the value of attribute sizeofcmds

Returns:

  • (Object)

    the current value of sizeofcmds



28
29
30
# File 'lib/odinflex/mach-o.rb', line 28

def sizeofcmds
  @sizeofcmds
end

Instance Method Details

#dsym_file?Boolean

Returns:

  • (Boolean)


62
63
64
# File 'lib/odinflex/mach-o.rb', line 62

def dsym_file?
  filetype == MH_DSYM
end

#executable_file?Boolean

Returns:

  • (Boolean)


58
59
60
# File 'lib/odinflex/mach-o.rb', line 58

def executable_file?
  filetype == MH_EXECUTE
end

#object_file?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/odinflex/mach-o.rb', line 54

def object_file?
  filetype == MH_OBJECT
end