Class: MachO::LoadCommands::FilesetEntryCommand

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

Overview

A load command containing a description of a Mach-O that is a constituent of a fileset. Each entry is further described by its own Mach header. Corresponds to LC_FILESET_ENTRY.

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

28

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, vmaddr, fileoff, entry_id, reserved) ⇒ FilesetEntryCommand

Returns a new instance of FilesetEntryCommand.



1825
1826
1827
1828
1829
1830
1831
# File 'lib/macho/load_commands.rb', line 1825

def initialize(view, cmd, cmdsize, vmaddr, fileoff, entry_id, reserved)
  super(view, cmd, cmdsize)
  @vmaddr = vmaddr
  @fileoff = fileoff
  @entry_id = LCStr.new(self, entry_id)
  @reserved = reserved
end

Instance Attribute Details

#entry_idLCStr (readonly)

Returns the entry's ID.

Returns:

  • (LCStr)

    the entry's ID



1812
1813
1814
# File 'lib/macho/load_commands.rb', line 1812

def entry_id
  @entry_id
end

#fileoffInteger (readonly)

Returns the file offset of the entry.

Returns:

  • (Integer)

    the file offset of the entry



1809
1810
1811
# File 'lib/macho/load_commands.rb', line 1809

def fileoff
  @fileoff
end

#reservedvoid (readonly)

This method returns an undefined value.



1815
1816
1817
# File 'lib/macho/load_commands.rb', line 1815

def reserved
  @reserved
end

#vmaddrInteger (readonly)

Returns the virtual memory address of the entry.

Returns:

  • (Integer)

    the virtual memory address of the entry



1806
1807
1808
# File 'lib/macho/load_commands.rb', line 1806

def vmaddr
  @vmaddr
end

Instance Method Details

#to_hHash

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

Returns:



1834
1835
1836
1837
1838
1839
1840
1841
# File 'lib/macho/load_commands.rb', line 1834

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