Class: MachO::LoadCommands::PreboundDylibCommand

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

Overview

A load command used to indicate dynamic libraries used in prebinding. Corresponds to LC_PREBOUND_DYLIB.

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=5".freeze
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.

20

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, nmodules, linked_modules) ⇒ PreboundDylibCommand

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of PreboundDylibCommand.



569
570
571
572
573
574
# File 'lib/macho/load_commands.rb', line 569

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

Instance Attribute Details

#linked_modulesFixnum (readonly)

Returns a bit vector of linked modules.

Returns:

  • (Fixnum)

    a bit vector of linked modules



558
559
560
# File 'lib/macho/load_commands.rb', line 558

def linked_modules
  @linked_modules
end

#nameLCStr (readonly)

Returns the library's path name as an LCStr.

Returns:

  • (LCStr)

    the library's path name as an LCStr



552
553
554
# File 'lib/macho/load_commands.rb', line 552

def name
  @name
end

#nmodulesFixnum (readonly)

Returns the number of modules in the library.

Returns:

  • (Fixnum)

    the number of modules in the library



555
556
557
# File 'lib/macho/load_commands.rb', line 555

def nmodules
  @nmodules
end