Class: MachO::SegmentCommand64

Inherits:
LoadCommand show all
Defined in:
lib/macho/load_commands.rb

Instance Attribute Summary collapse

Attributes inherited from LoadCommand

#cmd, #cmdsize, #offset

Instance Method Summary collapse

Methods inherited from LoadCommand

new_from_bin, #to_s

Methods inherited from MachOStructure

bytesize, new_from_bin

Constructor Details

#initialize(offset, cmd, cmdsize, segname, vmaddr, vmsize, fileoff, filesize, maxprot, initprot, nsects, flags) ⇒ SegmentCommand64

Returns a new instance of SegmentCommand64.



236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/macho/load_commands.rb', line 236

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

#fileoffObject (readonly)

Returns the value of attribute fileoff.



230
231
232
# File 'lib/macho/load_commands.rb', line 230

def fileoff
  @fileoff
end

#filesizeObject (readonly)

Returns the value of attribute filesize.



230
231
232
# File 'lib/macho/load_commands.rb', line 230

def filesize
  @filesize
end

#flagsObject (readonly)

Returns the value of attribute flags.



231
232
233
# File 'lib/macho/load_commands.rb', line 231

def flags
  @flags
end

#initprotObject (readonly)

Returns the value of attribute initprot.



231
232
233
# File 'lib/macho/load_commands.rb', line 231

def initprot
  @initprot
end

#maxprotObject (readonly)

Returns the value of attribute maxprot.



230
231
232
# File 'lib/macho/load_commands.rb', line 230

def maxprot
  @maxprot
end

#nsectsObject (readonly)

Returns the value of attribute nsects.



231
232
233
# File 'lib/macho/load_commands.rb', line 231

def nsects
  @nsects
end

#segnameObject (readonly)

Returns the value of attribute segname.



230
231
232
# File 'lib/macho/load_commands.rb', line 230

def segname
  @segname
end

#vmaddrObject (readonly)

Returns the value of attribute vmaddr.



230
231
232
# File 'lib/macho/load_commands.rb', line 230

def vmaddr
  @vmaddr
end

#vmsizeObject (readonly)

Returns the value of attribute vmsize.



230
231
232
# File 'lib/macho/load_commands.rb', line 230

def vmsize
  @vmsize
end

Instance Method Details

#segment_nameObject



250
251
252
# File 'lib/macho/load_commands.rb', line 250

def segment_name
  @segname.delete("\x00")
end