Class: MachO::LoadCommands::PreboundDylibCommand
- Inherits:
-
LoadCommand
- Object
- MachOStructure
- LoadCommand
- MachO::LoadCommands::PreboundDylibCommand
- 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"
- 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
-
#linked_modules ⇒ Integer
readonly
A bit vector of linked modules.
-
#name ⇒ LCStr
readonly
The library's path name as an LCStr.
-
#nmodules ⇒ Integer
readonly
The number of modules in the library.
Attributes inherited from LoadCommand
Instance Method Summary collapse
-
#initialize(view, cmd, cmdsize, name, nmodules, linked_modules) ⇒ PreboundDylibCommand
constructor
private
A new instance of PreboundDylibCommand.
-
#to_h ⇒ Hash
A hash representation of this PreboundDylibCommand.
Methods inherited from LoadCommand
create, new_from_bin, #offset, #serializable?, #serialize, #to_s, #type
Methods inherited from MachOStructure
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.
666 667 668 669 670 671 |
# File 'lib/macho/load_commands.rb', line 666 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_modules ⇒ Integer (readonly)
Returns a bit vector of linked modules.
655 656 657 |
# File 'lib/macho/load_commands.rb', line 655 def linked_modules @linked_modules end |
#name ⇒ LCStr (readonly)
Returns the library's path name as an LCStr.
649 650 651 |
# File 'lib/macho/load_commands.rb', line 649 def name @name end |
#nmodules ⇒ Integer (readonly)
Returns the number of modules in the library.
652 653 654 |
# File 'lib/macho/load_commands.rb', line 652 def nmodules @nmodules end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this MachO::LoadCommands::PreboundDylibCommand.
674 675 676 677 678 679 680 |
# File 'lib/macho/load_commands.rb', line 674 def to_h { "name" => name.to_h, "nmodules" => nmodules, "linked_modules" => linked_modules, }.merge super end |