Class: Indis::MachO::SymTabCommand

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

Overview

LC_SYMTAB

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

#symbolsObject (readonly)

Returns the value of attribute symbols



214
215
216
# File 'lib/indis-macho/command.rb', line 214

def symbols
  @symbols
end

Instance Method Details

#process(payload) ⇒ Object



216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# File 'lib/indis-macho/command.rb', line 216

def process(payload)
  super(payload)
  
  pos = payload.pos
  
  payload.pos = @stroff
  strings = StringIO.new(payload.read(@strsize))
  
  payload.pos = @symoff
  @symbols = []
  
  @nsyms.times do |n|
    s = Indis::MachO::Symbol.new(payload, strings)
    @symbols << s
  end
  payload.pos = pos
end