Class: Pliney::MachO::CommonLCReader
- Defined in:
- lib/pliney/macho.rb
Direct Known Subclasses
CommonDylibCommandReader, CommonEncryptionInfoReader, CommonLinkeditDataCommandReader, CommonSegmentReader, LC_RPATH_Reader, UndefinedLCReader
Instance Attribute Summary collapse
-
#cmd ⇒ Object
readonly
Returns the value of attribute cmd.
-
#cmdsize ⇒ Object
readonly
Returns the value of attribute cmdsize.
Attributes inherited from Reader
Instance Method Summary collapse
Methods inherited from Reader
Constructor Details
This class inherits a constructor from Pliney::MachO::Reader
Instance Attribute Details
#cmd ⇒ Object (readonly)
Returns the value of attribute cmd.
335 336 337 |
# File 'lib/pliney/macho.rb', line 335 def cmd @cmd end |
#cmdsize ⇒ Object (readonly)
Returns the value of attribute cmdsize.
335 336 337 |
# File 'lib/pliney/macho.rb', line 335 def cmdsize @cmdsize end |
Instance Method Details
#parse ⇒ Object
336 337 338 339 340 341 342 343 |
# File 'lib/pliney/macho.rb', line 336 def parse() super() @cmd = @fh.read_uint32le @cmdsize = @fh.read_uint32le if @cmdsize < 8 raise(ReaderError, "Load command size too small (#{@cmdsize} bytes) at offset #{@fh.pos - 4}") end end |
#resolve_type ⇒ Object
345 346 347 |
# File 'lib/pliney/macho.rb', line 345 def resolve_type() MachO::resolve_lc(@cmd) end |