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



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

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

#reservedvoid

This method returns an undefined value.



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

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



584
585
586
# File 'lib/macho/headers.rb', line 584

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



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

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

#to_hHash

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

Returns:



589
590
591
592
593
# File 'lib/macho/headers.rb', line 589

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