Class: Pliney::MachO::CommonSectionReader

Inherits:
Reader
  • Object
show all
Defined in:
lib/pliney/macho.rb

Direct Known Subclasses

Section64Reader, SectionReader

Instance Attribute Summary collapse

Attributes inherited from Reader

#fh, #startpos

Instance Method Summary collapse

Methods inherited from Reader

#initialize, parse, #rewind

Constructor Details

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

Instance Attribute Details

#_reserved1Object (readonly)

Returns the value of attribute _reserved1.



374
375
376
# File 'lib/pliney/macho.rb', line 374

def _reserved1
  @_reserved1
end

#_reserved2Object (readonly)

Returns the value of attribute _reserved2.



374
375
376
# File 'lib/pliney/macho.rb', line 374

def _reserved2
  @_reserved2
end

#addrObject (readonly)

Returns the value of attribute addr.



374
375
376
# File 'lib/pliney/macho.rb', line 374

def addr
  @addr
end

#alignObject (readonly)

Returns the value of attribute align.



374
375
376
# File 'lib/pliney/macho.rb', line 374

def align
  @align
end

#flagsObject (readonly)

Returns the value of attribute flags.



374
375
376
# File 'lib/pliney/macho.rb', line 374

def flags
  @flags
end

#nrelocObject (readonly)

Returns the value of attribute nreloc.



374
375
376
# File 'lib/pliney/macho.rb', line 374

def nreloc
  @nreloc
end

#offsetObject (readonly)

Returns the value of attribute offset.



374
375
376
# File 'lib/pliney/macho.rb', line 374

def offset
  @offset
end

#reloffObject (readonly)

Returns the value of attribute reloff.



374
375
376
# File 'lib/pliney/macho.rb', line 374

def reloff
  @reloff
end

#sectnameObject (readonly)

Returns the value of attribute sectname.



374
375
376
# File 'lib/pliney/macho.rb', line 374

def sectname
  @sectname
end

#segnameObject (readonly)

Returns the value of attribute segname.



374
375
376
# File 'lib/pliney/macho.rb', line 374

def segname
  @segname
end

#sizeObject (readonly)

Returns the value of attribute size.



374
375
376
# File 'lib/pliney/macho.rb', line 374

def size
  @size
end

Instance Method Details

#parseObject



375
376
377
378
379
# File 'lib/pliney/macho.rb', line 375

def parse()
    super()
    @sectname = @fh.strictread(16)
    @segname = @fh.strictread(16)
end

#section_nameObject



385
386
387
# File 'lib/pliney/macho.rb', line 385

def section_name()
    @sectname.unpack("Z16").first
end

#segment_nameObject



381
382
383
# File 'lib/pliney/macho.rb', line 381

def segment_name()
    @segname.unpack("Z16").first
end