Class: MachO::LoadCommands::FvmfileCommand

Inherits:
LoadCommand show all
Defined in:
lib/macho/load_commands.rb

Overview

An obsolete load command containing the path to a file to be loaded into memory. Corresponds to LC_FVMFILE.

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.

"L=4"
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.

16

Instance Attribute Summary collapse

Attributes inherited from LoadCommand

#cmd, #cmdsize, #view

Instance Method Summary collapse

Methods inherited from LoadCommand

create, new_from_bin, #offset, #serializable?, #serialize, #to_s, #type

Methods inherited from MachOStructure

bytesize, new_from_bin

Constructor Details

#initialize(view, cmd, cmdsize, name, header_addr) ⇒ FvmfileCommand

Returns a new instance of FvmfileCommand.



1709
1710
1711
1712
1713
# File 'lib/macho/load_commands.rb', line 1709

def initialize(view, cmd, cmdsize, name, header_addr)
  super(view, cmd, cmdsize)
  @name = LCStr.new(self, name)
  @header_addr = header_addr
end

Instance Attribute Details

#header_addrInteger (readonly)

Returns the virtual address being loaded at.

Returns:

  • (Integer)

    the virtual address being loaded at



1699
1700
1701
# File 'lib/macho/load_commands.rb', line 1699

def header_addr
  @header_addr
end

#nameLCStr (readonly)

Returns the pathname of the file being loaded.

Returns:

  • (LCStr)

    the pathname of the file being loaded



1696
1697
1698
# File 'lib/macho/load_commands.rb', line 1696

def name
  @name
end

Instance Method Details

#to_hHash

Returns a hash representation of this MachO::LoadCommands::FvmfileCommand.

Returns:



1716
1717
1718
1719
1720
1721
# File 'lib/macho/load_commands.rb', line 1716

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