Class: OdinFlex::MachO::LC_SEGMENT_64
- Defined in:
- lib/odinflex/mach-o.rb
Constant Summary collapse
- VALUE =
0x19
- SIZE =
segname
16 + # segname 8 + # vmaddr 8 + # vmsize 8 + # fileoff 8 + # filesize 4 + # maxprot 4 + # initprot 4 + # nsects 4
Instance Attribute Summary collapse
-
#fileoff ⇒ Object
readonly
Returns the value of attribute fileoff.
-
#filesize ⇒ Object
readonly
Returns the value of attribute filesize.
-
#flags ⇒ Object
readonly
Returns the value of attribute flags.
-
#initprot ⇒ Object
readonly
Returns the value of attribute initprot.
-
#maxprot ⇒ Object
readonly
Returns the value of attribute maxprot.
-
#nsects ⇒ Object
readonly
Returns the value of attribute nsects.
-
#segname ⇒ Object
readonly
Returns the value of attribute segname.
-
#vmaddr ⇒ Object
readonly
Returns the value of attribute vmaddr.
-
#vmsize ⇒ Object
readonly
Returns the value of attribute vmsize.
Attributes inherited from Command
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cmd, size, segname, vmaddr, vmsize, fileoff, filesize, maxprot, initprot, nsects, flags) ⇒ LC_SEGMENT_64
constructor
A new instance of LC_SEGMENT_64.
- #segment? ⇒ Boolean
Methods inherited from Command
Methods included from SectionTypes
#command?, #dysymtab?, #section?, #symtab?
Constructor Details
#initialize(cmd, size, segname, vmaddr, vmsize, fileoff, filesize, maxprot, initprot, nsects, flags) ⇒ LC_SEGMENT_64
Returns a new instance of LC_SEGMENT_64.
424 425 426 427 428 429 430 431 432 433 434 435 |
# File 'lib/odinflex/mach-o.rb', line 424 def initialize cmd, size, segname, vmaddr, vmsize, fileoff, filesize, maxprot, initprot, nsects, flags super(cmd, size) @segname = segname @vmaddr = vmaddr @vmsize = vmsize @fileoff = fileoff @filesize = filesize @maxprot = maxprot @initprot = initprot @nsects = nsects @flags = flags end |
Instance Attribute Details
#fileoff ⇒ Object (readonly)
Returns the value of attribute fileoff.
422 423 424 |
# File 'lib/odinflex/mach-o.rb', line 422 def fileoff @fileoff end |
#filesize ⇒ Object (readonly)
Returns the value of attribute filesize.
422 423 424 |
# File 'lib/odinflex/mach-o.rb', line 422 def filesize @filesize end |
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
422 423 424 |
# File 'lib/odinflex/mach-o.rb', line 422 def flags @flags end |
#initprot ⇒ Object (readonly)
Returns the value of attribute initprot.
422 423 424 |
# File 'lib/odinflex/mach-o.rb', line 422 def initprot @initprot end |
#maxprot ⇒ Object (readonly)
Returns the value of attribute maxprot.
422 423 424 |
# File 'lib/odinflex/mach-o.rb', line 422 def maxprot @maxprot end |
#nsects ⇒ Object (readonly)
Returns the value of attribute nsects.
422 423 424 |
# File 'lib/odinflex/mach-o.rb', line 422 def nsects @nsects end |
#segname ⇒ Object (readonly)
Returns the value of attribute segname.
422 423 424 |
# File 'lib/odinflex/mach-o.rb', line 422 def segname @segname end |
#vmaddr ⇒ Object (readonly)
Returns the value of attribute vmaddr.
422 423 424 |
# File 'lib/odinflex/mach-o.rb', line 422 def vmaddr @vmaddr end |
#vmsize ⇒ Object (readonly)
Returns the value of attribute vmsize.
422 423 424 |
# File 'lib/odinflex/mach-o.rb', line 422 def vmsize @vmsize end |
Class Method Details
.from_io(cmd, size, offset, io) ⇒ Object
flags
418 419 420 |
# File 'lib/odinflex/mach-o.rb', line 418 def self.from_io cmd, size, offset, io new(cmd, size, *io.read(SIZE).unpack('A16Q4L4')) end |
Instance Method Details
#segment? ⇒ Boolean
437 |
# File 'lib/odinflex/mach-o.rb', line 437 def segment?; true; end |