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.

Instance Method Summary collapse

Methods inherited from LoadCommand

#cmd, #cmdsize, create, new_from_bin, #offset, #serializable?, #serialize, #to_s, #type, #view

Methods inherited from MachOStructure

bytesize, format, #initialize, new_from_bin

Constructor Details

This class inherits a constructor from MachO::MachOStructure

Instance Method Details

#entry_idLCStr

Returns the entry's ID.

Returns:

  • (LCStr)

    the entry's ID



1477
# File 'lib/macho/load_commands.rb', line 1477

field :entry_id, :lcstr, :to_s => true

#fileoffInteger

Returns the file offset of the entry.

Returns:

  • (Integer)

    the file offset of the entry



1474
# File 'lib/macho/load_commands.rb', line 1474

field :fileoff, :uint64

#reservedvoid

This method returns an undefined value.



1480
# File 'lib/macho/load_commands.rb', line 1480

field :reserved, :uint32

#segmentSegmentCommand64?

Returns the matching segment command or nil if nothing matches.

Returns:

  • (SegmentCommand64, nil)

    the matching segment command or nil if nothing matches



1493
1494
1495
# File 'lib/macho/load_commands.rb', line 1493

def segment
  view.macho_file.command(:LC_SEGMENT_64).select { |cmd| cmd.fileoff == fileoff }.first
end

#to_hHash

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

Returns:



1483
1484
1485
1486
1487
1488
1489
1490
# File 'lib/macho/load_commands.rb', line 1483

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

#vmaddrInteger

Returns the virtual memory address of the entry.

Returns:

  • (Integer)

    the virtual memory address of the entry



1471
# File 'lib/macho/load_commands.rb', line 1471

field :vmaddr, :uint64