Class: Pliney::MachO::LC_SEGMENT_64_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



439
440
441
442
443
444
445
446
447
448
449
450
451
# File 'lib/pliney/macho.rb', line 439

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

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