Class: MachO::SegmentCommand
- Inherits:
-
LoadCommand
- Object
- MachOStructure
- LoadCommand
- MachO::SegmentCommand
- Defined in:
- lib/macho/load_commands.rb
Overview
A load command indicating that part of this file is to be mapped into the task’s address space. Corresponds to LC_SEGMENT.
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 LoadCommand
Instance Method Summary collapse
-
#initialize(offset, cmd, cmdsize, segname, vmaddr, vmsize, fileoff, filesize, maxprot, initprot, nsects, flags) ⇒ SegmentCommand
constructor
A new instance of SegmentCommand.
-
#segment_name ⇒ String
The segment’s name, with any trailing NULL characters removed.
Methods inherited from LoadCommand
Methods inherited from MachOStructure
Constructor Details
#initialize(offset, cmd, cmdsize, segname, vmaddr, vmsize, fileoff, filesize, maxprot, initprot, nsects, flags) ⇒ SegmentCommand
Returns a new instance of SegmentCommand.
353 354 355 356 357 358 359 360 361 362 363 364 365 |
# File 'lib/macho/load_commands.rb', line 353 def initialize(offset, cmd, cmdsize, segname, vmaddr, vmsize, fileoff, filesize, maxprot, initprot, nsects, flags) super(offset, cmd, cmdsize) @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.
346 347 348 |
# File 'lib/macho/load_commands.rb', line 346 def fileoff @fileoff end |
#filesize ⇒ Object (readonly)
Returns the value of attribute filesize.
346 347 348 |
# File 'lib/macho/load_commands.rb', line 346 def filesize @filesize end |
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
347 348 349 |
# File 'lib/macho/load_commands.rb', line 347 def flags @flags end |
#initprot ⇒ Object (readonly)
Returns the value of attribute initprot.
347 348 349 |
# File 'lib/macho/load_commands.rb', line 347 def initprot @initprot end |
#maxprot ⇒ Object (readonly)
Returns the value of attribute maxprot.
346 347 348 |
# File 'lib/macho/load_commands.rb', line 346 def maxprot @maxprot end |
#nsects ⇒ Object (readonly)
Returns the value of attribute nsects.
347 348 349 |
# File 'lib/macho/load_commands.rb', line 347 def nsects @nsects end |
#segname ⇒ Object (readonly)
Returns the value of attribute segname.
346 347 348 |
# File 'lib/macho/load_commands.rb', line 346 def segname @segname end |
#vmaddr ⇒ Object (readonly)
Returns the value of attribute vmaddr.
346 347 348 |
# File 'lib/macho/load_commands.rb', line 346 def vmaddr @vmaddr end |
#vmsize ⇒ Object (readonly)
Returns the value of attribute vmsize.
346 347 348 |
# File 'lib/macho/load_commands.rb', line 346 def vmsize @vmsize end |
Instance Method Details
#segment_name ⇒ String
Returns the segment’s name, with any trailing NULL characters removed.
368 369 370 |
# File 'lib/macho/load_commands.rb', line 368 def segment_name @segname.delete("\x00") end |