Class: MachO::SegmentCommand64
- Inherits:
-
LoadCommand
- Object
- MachOStructure
- LoadCommand
- MachO::SegmentCommand64
- 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_64.
Constant Summary collapse
- FORMAT =
"VVa16QQQQVVVV"- SIZEOF =
72
Instance Attribute Summary collapse
-
#fileoff ⇒ Fixnum
readonly
The file offset of the segment.
-
#filesize ⇒ Fixnum
readonly
The amount to map from the file.
-
#flags ⇒ Fixnum
readonly
Any flags associated with the segment.
-
#initprot ⇒ Fixnum
readonly
The initial VM protection.
-
#maxprot ⇒ Fixnum
readonly
The maximum VM protection.
-
#nsects ⇒ Fixnum
readonly
The number of sections in the segment.
-
#segname ⇒ String
readonly
The name of the segment.
-
#vmaddr ⇒ Fixnum
readonly
The memory address of the segment.
-
#vmsize ⇒ Fixnum
readonly
The memory size of the segment.
Attributes inherited from LoadCommand
Instance Method Summary collapse
-
#initialize(raw_data, offset, cmd, cmdsize, segname, vmaddr, vmsize, fileoff, filesize, maxprot, initprot, nsects, flags) ⇒ SegmentCommand64
constructor
private
A new instance of SegmentCommand64.
Methods inherited from LoadCommand
Methods inherited from MachOStructure
Constructor Details
#initialize(raw_data, offset, cmd, cmdsize, segname, vmaddr, vmsize, fileoff, filesize, maxprot, initprot, nsects, flags) ⇒ SegmentCommand64
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of SegmentCommand64.
332 333 334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/macho/load_commands.rb', line 332 def initialize(raw_data, offset, cmd, cmdsize, segname, vmaddr, vmsize, fileoff, filesize, maxprot, initprot, nsects, flags) super(raw_data, offset, cmd, cmdsize) @segname = segname.delete("\x00") @vmaddr = vmaddr @vmsize = vmsize @fileoff = fileoff @filesize = filesize @maxprot = maxprot @initprot = initprot @nsects = nsects @flags = flags end |
Instance Attribute Details
#fileoff ⇒ Fixnum (readonly)
Returns the file offset of the segment.
311 312 313 |
# File 'lib/macho/load_commands.rb', line 311 def fileoff @fileoff end |
#filesize ⇒ Fixnum (readonly)
Returns the amount to map from the file.
314 315 316 |
# File 'lib/macho/load_commands.rb', line 314 def filesize @filesize end |
#flags ⇒ Fixnum (readonly)
Returns any flags associated with the segment.
326 327 328 |
# File 'lib/macho/load_commands.rb', line 326 def flags @flags end |
#initprot ⇒ Fixnum (readonly)
Returns the initial VM protection.
320 321 322 |
# File 'lib/macho/load_commands.rb', line 320 def initprot @initprot end |
#maxprot ⇒ Fixnum (readonly)
Returns the maximum VM protection.
317 318 319 |
# File 'lib/macho/load_commands.rb', line 317 def maxprot @maxprot end |
#nsects ⇒ Fixnum (readonly)
Returns the number of sections in the segment.
323 324 325 |
# File 'lib/macho/load_commands.rb', line 323 def nsects @nsects end |
#segname ⇒ String (readonly)
Returns the name of the segment.
302 303 304 |
# File 'lib/macho/load_commands.rb', line 302 def segname @segname end |
#vmaddr ⇒ Fixnum (readonly)
Returns the memory address of the segment.
305 306 307 |
# File 'lib/macho/load_commands.rb', line 305 def vmaddr @vmaddr end |
#vmsize ⇒ Fixnum (readonly)
Returns the memory size of the segment.
308 309 310 |
# File 'lib/macho/load_commands.rb', line 308 def vmsize @vmsize end |