Class: OdinFlex::MachO::LC_FUNCTION_STARTS

Inherits:
Command
  • Object
show all
Defined in:
lib/odinflex/mach-o.rb

Direct Known Subclasses

LC_DATA_IN_CODE

Constant Summary collapse

VALUE =
0x26
SIZE =

dataoff

4 + # dataoff
4

Instance Attribute Summary collapse

Attributes inherited from Command

#cmd, #size

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

#command?, from_offset

Methods included from SectionTypes

#command?, #dysymtab?, #section?, #segment?, #symtab?

Constructor Details

#initialize(cmd, size, dataoff, datasize) ⇒ LC_FUNCTION_STARTS

Returns a new instance of LC_FUNCTION_STARTS.



113
114
115
116
117
# File 'lib/odinflex/mach-o.rb', line 113

def initialize cmd, size, dataoff, datasize
  super(cmd, size)
  @dataoff  = dataoff
  @datasize = datasize
end

Instance Attribute Details

#dataoffObject (readonly)

Returns the value of attribute dataoff.



111
112
113
# File 'lib/odinflex/mach-o.rb', line 111

def dataoff
  @dataoff
end

#datasizeObject (readonly)

Returns the value of attribute datasize.



111
112
113
# File 'lib/odinflex/mach-o.rb', line 111

def datasize
  @datasize
end

Class Method Details

.from_io(cmd, size, offset, io) ⇒ Object

datasize



107
108
109
# File 'lib/odinflex/mach-o.rb', line 107

def self.from_io cmd, size, offset, io
  new(cmd, size, *io.read(SIZE).unpack("LL"))
end