Class: MachO::DylibCommand

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

Overview

A load command representing some aspect of shared libraries, depending on filetype. Corresponds to LC_ID_DYLIB, LC_LOAD_DYLIB, LC_LOAD_WEAK_DYLIB, and LC_REEXPORT_DYLIB.

Constant Summary collapse

FORMAT =
"VVVVVV"
SIZEOF =
24

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, timestamp, current_version, compatibility_version) ⇒ DylibCommand

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



384
385
386
387
388
389
390
391
# File 'lib/macho/load_commands.rb', line 384

def initialize(raw_data, offset, cmd, cmdsize, name, timestamp, current_version,
		compatibility_version)
	super(raw_data, offset, cmd, cmdsize)
	@name = LCStr.new(raw_data, self, name)
	@timestamp = timestamp
	@current_version = current_version
	@compatibility_version = compatibility_version
end

Instance Attribute Details

#compatibility_versionFixnum (readonly)



378
379
380
# File 'lib/macho/load_commands.rb', line 378

def compatibility_version
  @compatibility_version
end

#current_versionFixnum (readonly)



375
376
377
# File 'lib/macho/load_commands.rb', line 375

def current_version
  @current_version
end

#nameMachO::LoadCommand::LCStr (readonly)



369
370
371
# File 'lib/macho/load_commands.rb', line 369

def name
  @name
end

#timestampFixnum (readonly)



372
373
374
# File 'lib/macho/load_commands.rb', line 372

def timestamp
  @timestamp
end