Class: MachO::Headers::FatArch
- Inherits:
-
MachOStructure
- Object
- MachOStructure
- MachO::Headers::FatArch
- Defined in:
- lib/macho/headers.rb
Overview
"32-bit" indicates the fact that this structure stores 32-bit offsets, not that the Mach-Os that it points to necessarily are 32-bit.
32-bit fat binary header architecture structure. A 32-bit fat Mach-O has one or more of these, indicating one or more internal Mach-O blobs.
Direct Known Subclasses
Instance Method Summary collapse
-
#align ⇒ Integer
The alignment, as a power of 2.
-
#cpusubtype ⇒ Integer
The CPU subtype of the Mach-O.
-
#cputype ⇒ Integer
The CPU type of the Mach-O.
-
#offset ⇒ Integer
The file offset to the beginning of the Mach-O data.
-
#serialize ⇒ String
The serialized fields of the fat arch.
-
#size ⇒ Integer
The size, in bytes, of the Mach-O data.
-
#to_h ⇒ Hash
A hash representation of this FatArch.
Methods inherited from MachOStructure
bytesize, format, #initialize, new_from_bin
Constructor Details
This class inherits a constructor from MachO::MachOStructure
Instance Method Details
#align ⇒ Integer
Returns the alignment, as a power of 2.
547 |
# File 'lib/macho/headers.rb', line 547 field :align, :uint32, :endian => :big |
#cpusubtype ⇒ Integer
Returns the CPU subtype of the Mach-O.
538 |
# File 'lib/macho/headers.rb', line 538 field :cpusubtype, :uint32, :endian => :big, :mask => CPU_SUBTYPE_MASK |
#cputype ⇒ Integer
Returns the CPU type of the Mach-O.
535 |
# File 'lib/macho/headers.rb', line 535 field :cputype, :uint32, :endian => :big |
#offset ⇒ Integer
Returns the file offset to the beginning of the Mach-O data.
541 |
# File 'lib/macho/headers.rb', line 541 field :offset, :uint32, :endian => :big |
#serialize ⇒ String
Returns the serialized fields of the fat arch.
550 551 552 |
# File 'lib/macho/headers.rb', line 550 def serialize [cputype, cpusubtype, offset, size, align].pack(self.class.format) end |
#size ⇒ Integer
Returns the size, in bytes, of the Mach-O data.
544 |
# File 'lib/macho/headers.rb', line 544 field :size, :uint32, :endian => :big |
#to_h ⇒ Hash
Returns a hash representation of this MachO::Headers::FatArch.
555 556 557 558 559 560 561 562 563 564 565 |
# File 'lib/macho/headers.rb', line 555 def to_h { "cputype" => cputype, "cputype_sym" => CPU_TYPES[cputype], "cpusubtype" => cpusubtype, "cpusubtype_sym" => CPU_SUBTYPES[cputype][cpusubtype], "offset" => offset, "size" => size, "align" => align, }.merge super end |