Class: Indis::MachO::LoadDyLibCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/indis-macho/command.rb

Overview

LC_LOAD_DYLIB

Constant Summary

Constants inherited from Command

Command::CMD, Command::CMD_CLASS, Command::LC_REQ_DYLD

Instance Attribute Summary collapse

Attributes inherited from Command

#cmd, #length

Instance Method Summary collapse

Methods inherited from Command

class_of_command, #initialize

Constructor Details

This class inherits a constructor from Indis::MachO::Command

Instance Attribute Details

#compatibility_versionObject (readonly)

Returns the value of attribute compatibility_version.



285
286
287
# File 'lib/indis-macho/command.rb', line 285

def compatibility_version
  @compatibility_version
end

#current_versionObject (readonly)

Returns the value of attribute current_version.



285
286
287
# File 'lib/indis-macho/command.rb', line 285

def current_version
  @current_version
end

#nameObject (readonly)

Returns the value of attribute name.



285
286
287
# File 'lib/indis-macho/command.rb', line 285

def name
  @name
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



285
286
287
# File 'lib/indis-macho/command.rb', line 285

def timestamp
  @timestamp
end

Instance Method Details

#process(payload) ⇒ Object



287
288
289
290
291
292
293
294
295
296
# File 'lib/indis-macho/command.rb', line 287

def process(payload)
  super(payload)
  
  ofs_to_name = payload.read(4).unpack('V')[0]
  
  @timestamp, @current_version, @compatibility_version = payload.read(4*3).unpack('VVV')
  
  name_sz = @length - ofs_to_name - 4*3 + 8 + 4
  @name = payload.read(name_sz).strip
end