Class: MachO::Headers::PrelinkedKernelHeader
- Inherits:
-
MachOStructure
- Object
- MachOStructure
- MachO::Headers::PrelinkedKernelHeader
- Defined in:
- lib/macho/headers.rb
Overview
Prelinked kernel/"kernelcache" header structure
Instance Method Summary collapse
-
#adler32 ⇒ Integer
A checksum for the uncompressed data.
-
#compress_type ⇒ Integer
The type of compression used.
-
#compressed_size ⇒ Integer
The size of the compressed data, in bytes.
-
#kaslr? ⇒ Boolean
Whether this prelinked kernel supports KASLR.
-
#lzss? ⇒ Boolean
Whether this prelinked kernel is compressed with LZSS.
-
#lzvn? ⇒ Boolean
Whether this prelinked kernel is compressed with LZVN.
- #platform_name ⇒ void
-
#prelink_version ⇒ Integer
The version of the prelink format.
- #reserved ⇒ void
- #root_path ⇒ void
-
#signature ⇒ Integer
The magic number for a compressed header (COMPRESSED_MAGIC).
-
#to_h ⇒ Hash
A hash representation of this PrelinkedKernelHeader.
-
#uncompressed_size ⇒ Integer
The size of the uncompressed data, in bytes.
Methods inherited from MachOStructure
bytesize, format, #initialize, new_from_bin
Constructor Details
This class inherits a constructor from MachO::MachOStructure
Instance Method Details
#adler32 ⇒ Integer
Returns a checksum for the uncompressed data.
742 |
# File 'lib/macho/headers.rb', line 742 field :adler32, :uint32, :endian => :big |
#compress_type ⇒ Integer
Returns the type of compression used.
739 |
# File 'lib/macho/headers.rb', line 739 field :compress_type, :uint32, :endian => :big |
#compressed_size ⇒ Integer
Returns the size of the compressed data, in bytes.
748 |
# File 'lib/macho/headers.rb', line 748 field :compressed_size, :uint32, :endian => :big |
#kaslr? ⇒ Boolean
Returns whether this prelinked kernel supports KASLR.
763 764 765 |
# File 'lib/macho/headers.rb', line 763 def kaslr? prelink_version >= 1 end |
#lzss? ⇒ Boolean
Returns whether this prelinked kernel is compressed with LZSS.
768 769 770 |
# File 'lib/macho/headers.rb', line 768 def lzss? compress_type == COMP_TYPE_LZSS end |
#lzvn? ⇒ Boolean
Returns whether this prelinked kernel is compressed with LZVN.
773 774 775 |
# File 'lib/macho/headers.rb', line 773 def lzvn? compress_type == COMP_TYPE_FASTLIB end |
#platform_name ⇒ void
This method returns an undefined value.
757 |
# File 'lib/macho/headers.rb', line 757 field :platform_name, :string, :size => 64 |
#prelink_version ⇒ Integer
Returns the version of the prelink format.
751 |
# File 'lib/macho/headers.rb', line 751 field :prelink_version, :uint32, :endian => :big |
#reserved ⇒ void
This method returns an undefined value.
754 |
# File 'lib/macho/headers.rb', line 754 field :reserved, :string, :size => 40, :unpack => "L>10" |
#root_path ⇒ void
This method returns an undefined value.
760 |
# File 'lib/macho/headers.rb', line 760 field :root_path, :string, :size => 256 |
#signature ⇒ Integer
Returns the magic number for a compressed header (COMPRESSED_MAGIC).
736 |
# File 'lib/macho/headers.rb', line 736 field :signature, :uint32, :endian => :big |
#to_h ⇒ Hash
Returns a hash representation of this MachO::Headers::PrelinkedKernelHeader.
778 779 780 781 782 783 784 785 786 787 788 789 790 |
# File 'lib/macho/headers.rb', line 778 def to_h { "signature" => signature, "compress_type" => compress_type, "adler32" => adler32, "uncompressed_size" => uncompressed_size, "compressed_size" => compressed_size, "prelink_version" => prelink_version, "reserved" => reserved, "platform_name" => platform_name, "root_path" => root_path, }.merge super end |
#uncompressed_size ⇒ Integer
Returns the size of the uncompressed data, in bytes.
745 |
# File 'lib/macho/headers.rb', line 745 field :uncompressed_size, :uint32, :endian => :big |