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:

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.

Note:

Always big endian.

"L>2Q>2L>2"
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 FatArch

#align, #cpusubtype, #cputype, #offset, #size

Instance Method Summary collapse

Methods inherited from MachOStructure

bytesize, new_from_bin

Constructor Details

#initialize(cputype, cpusubtype, offset, size, align, reserved = 0) ⇒ FatArch64

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 FatArch64.



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

def initialize(cputype, cpusubtype, offset, size, align, reserved = 0)
  super(cputype, cpusubtype, offset, size, align)
  @reserved = reserved
end

Instance Attribute Details

#reservedvoid (readonly)

This method returns an undefined value.



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

def reserved
  @reserved
end

Instance Method Details

#serializeString

Returns the serialized fields of the fat arch.

Returns:

  • (String)

    the serialized fields of the fat arch



607
608
609
# File 'lib/macho/headers.rb', line 607

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

#to_hHash

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

Returns:



612
613
614
615
616
# File 'lib/macho/headers.rb', line 612

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