Class: MachO::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 =
"VVVVV"
SIZEOF =
20

Instance Attribute Summary collapse

Attributes inherited from LoadCommand

#cmd, #cmdsize, #offset

Instance Method Summary collapse

Methods inherited from LoadCommand

new_from_bin, #to_s, #type

Methods inherited from MachOStructure

bytesize, new_from_bin

Constructor Details

#initialize(raw_data, offset, 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.



410
411
412
413
414
415
# File 'lib/macho/load_commands.rb', line 410

def initialize(raw_data, offset, cmd, cmdsize, name, nmodules, linked_modules)
  super(raw_data, offset, cmd, cmdsize)
  @name = LCStr.new(raw_data, 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



404
405
406
# File 'lib/macho/load_commands.rb', line 404

def linked_modules
  @linked_modules
end

#nameMachO::LoadCommand::LCStr (readonly)

Returns the library's path name as an LCStr.

Returns:



398
399
400
# File 'lib/macho/load_commands.rb', line 398

def name
  @name
end

#nmodulesFixnum (readonly)

Returns the number of modules in the library.

Returns:

  • (Fixnum)

    the number of modules in the library



401
402
403
# File 'lib/macho/load_commands.rb', line 401

def nmodules
  @nmodules
end