Class: MachO::Headers::FatArch64

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

Overview

Note:

"64-bit" indicates the fact that this structure stores 64-bit offsets, not that the Mach-Os that it points to necessarily are 64-bit.

64-bit fat binary header architecture structure. A 64-bit fat Mach-O has one or more of these, indicating one or more internal Mach-O blobs.

See Also:

Instance Method Summary collapse

Methods inherited from FatArch

#align, #cpusubtype, #cputype

Methods inherited from MachOStructure

bytesize, format, #initialize, new_from_bin

Constructor Details

This class inherits a constructor from MachO::MachOStructure

Instance Method Details

#offsetInteger

Returns the file offset to the beginning of the Mach-O data.

Returns:

  • (Integer)

    the file offset to the beginning of the Mach-O data



587
# File 'lib/macho/headers.rb', line 587

field :offset, :uint64, :endian => :big

#reservedvoid

This method returns an undefined value.



593
# File 'lib/macho/headers.rb', line 593

field :reserved, :uint32, :endian => :big, :default => 0

#serializeString

Returns the serialized fields of the fat arch.

Returns:

  • (String)

    the serialized fields of the fat arch



596
597
598
# File 'lib/macho/headers.rb', line 596

def serialize
  [cputype, cpusubtype, offset, size, align, reserved].pack(self.class.format)
end

#sizeInteger

Returns the size, in bytes, of the Mach-O data.

Returns:

  • (Integer)

    the size, in bytes, of the Mach-O data



590
# File 'lib/macho/headers.rb', line 590

field :size, :uint64, :endian => :big

#to_hHash

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

Returns:



601
602
603
604
605
# File 'lib/macho/headers.rb', line 601

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