Class: MachO::Headers::MachHeader64

Inherits:
MachHeader show all
Defined in:
lib/macho/headers.rb

Overview

64-bit Mach-O file header structure

Constant Summary collapse

FORMAT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

"L=8".freeze
SIZEOF =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

32

Instance Attribute Summary collapse

Attributes inherited from MachHeader

#cpusubtype, #cputype, #filetype, #flags, #magic, #ncmds, #sizeofcmds

Instance Method Summary collapse

Methods inherited from MachHeader

#alignment, #bundle?, #core?, #dsym?, #dylib?, #dylinker?, #executable?, #flag?, #fvmlib?, #kext?, #magic32?, #magic64?, #object?, #preload?

Methods inherited from MachOStructure

bytesize, new_from_bin

Constructor Details

#initialize(magic, cputype, cpusubtype, filetype, ncmds, sizeofcmds, flags, reserved) ⇒ MachHeader64

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of MachHeader64.



765
766
767
768
769
# File 'lib/macho/headers.rb', line 765

def initialize(magic, cputype, cpusubtype, filetype, ncmds, sizeofcmds,
               flags, reserved)
  super(magic, cputype, cpusubtype, filetype, ncmds, sizeofcmds, flags)
  @reserved = reserved
end

Instance Attribute Details

#reservedvoid (readonly)

This method returns an undefined value.



754
755
756
# File 'lib/macho/headers.rb', line 754

def reserved
  @reserved
end

Instance Method Details

#to_hHash

Returns a hash representation of this MachO::Headers::MachHeader64.

Returns:



772
773
774
775
776
# File 'lib/macho/headers.rb', line 772

def to_h
  {
    "reserved" => reserved,
  }.merge super
end