class MachO::Headers::FatArch

Fat binary header architecture structure. A Fat binary has one or more of these, representing one or more internal Mach-O blobs. @see MachO::Headers::FatHeader

Constants

FORMAT

always big-endian @see MachOStructure::FORMAT @api private

SIZEOF

@see MachOStructure::SIZEOF @api private

Attributes

align[R]

@return [Fixnum] the alignment, as a power of 2

cpusubtype[R]

@return [Fixnum] the CPU subtype of the Mach-O

cputype[R]

@return [Fixnum] the CPU type of the Mach-O

offset[R]

@return [Fixnum] the file offset to the beginning of the Mach-O data

size[R]

@return [Fixnum] the size, in bytes, of the Mach-O data

Public Class Methods

new(cputype, cpusubtype, offset, size, align) click to toggle source

@api private

# File lib/macho/headers.rb, line 509
def initialize(cputype, cpusubtype, offset, size, align)
  @cputype = cputype
  @cpusubtype = cpusubtype
  @offset = offset
  @size = size
  @align = align
end

Public Instance Methods

serialize() click to toggle source

@return [String] the serialized fields of the fat arch

# File lib/macho/headers.rb, line 518
def serialize
  [cputype, cpusubtype, offset, size, align].pack(FORMAT)
end