Class: Indis::MachO::DyldInfoOnlyCommand

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

Overview

LC_DYLD_INFO_ONLY

Constant Summary

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

#bind_symbolsObject (readonly)

Returns the value of attribute bind_symbols



323
324
325
# File 'lib/indis-macho/command.rb', line 323

def bind_symbols
  @bind_symbols
end

#lazy_bind_symbolsObject (readonly)

Returns the value of attribute lazy_bind_symbols



323
324
325
# File 'lib/indis-macho/command.rb', line 323

def lazy_bind_symbols
  @lazy_bind_symbols
end

#weak_bind_symbolsObject (readonly)

Returns the value of attribute weak_bind_symbols



323
324
325
# File 'lib/indis-macho/command.rb', line 323

def weak_bind_symbols
  @weak_bind_symbols
end

Instance Method Details

#process(payload) ⇒ Object



325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
# File 'lib/indis-macho/command.rb', line 325

def process(payload)
  super(payload)
  
  # TODO: rebase
  
  off = payload.pos
  payload.pos = @bind_off
  bind = payload.read(@bind_size)
  @bind_symbols = DyldInfoParser.new(bind).parse if @bind_size > 0
  
  payload.pos = @weak_bind_off
  weak_bind = payload.read(@weak_bind_size)
  @weak_bind_symbols = DyldInfoParser.new(weak_bind).parse if @weak_bind_size > 0
  
  payload.pos = @lazy_bind_off
  lazy_bind = payload.read(@lazy_bind_size)
  @lazy_bind_symbols = DyldInfoParser.new(lazy_bind).parse if @lazy_bind_size > 0
  
  # TODO: export
  
  payload.pos = off
end