Class: Pliney::MachO::LC_SEGMENT_Reader

Inherits:
CommonSegmentReader show all
Defined in:
lib/pliney/macho.rb

Instance Attribute Summary

Attributes inherited from CommonSegmentReader

#fileoff, #filesize, #flags, #initprot, #maxprot, #nsects, #sections, #segname, #vmaddr, #vmsize

Attributes inherited from CommonLCReader

#cmd, #cmdsize

Attributes inherited from Reader

#fh, #startpos

Instance Method Summary collapse

Methods inherited from CommonSegmentReader

#segment_name

Methods inherited from CommonLCReader

#resolve_type

Methods inherited from Reader

#initialize, parse, #rewind

Constructor Details

This class inherits a constructor from Pliney::MachO::Reader

Instance Method Details

#parseObject



423
424
425
426
427
428
429
430
431
432
433
434
435
# File 'lib/pliney/macho.rb', line 423

def parse()
    super()
    @vmaddr = @fh.read_uint32le
    @vmsize = @fh.read_uint32le
    @fileoff = @fh.read_uint32le
    @filesize = @fh.read_uint32le
    @maxprot = @fh.read_uint32le
    @initprot = @fh.read_uint32le
    @nsects = @fh.read_uint32le
    @flags = @fh.read_uint32le

    @sections = Array.new(@nsects) { SectionReader.parse(@fh) }
end