class OdinFlex::MachO::LC_LOAD_DYLIB

Constants

VALUE

Public Class Methods

from_io(cmd, size, offset, io) click to toggle source
# File lib/odinflex/mach-o.rb, line 127
def self.from_io cmd, size, offset, io
  # `size` is the total segment size including command and length bytes
  # so we need to remove them from the size.
  args = io.read(4 * 4).unpack('LLLL')
  io.seek offset + args.first, IO::SEEK_SET
  name = io.read(size - 8 - (4 * 4)).unpack1('A*')
  new(cmd, size, name, *args)
end
new(cmd, size, name, str_offset, timestamp, current_version, compat_version) click to toggle source
Calls superclass method OdinFlex::MachO::Command::new
# File lib/odinflex/mach-o.rb, line 136
def initialize cmd, size, name, str_offset, timestamp, current_version, compat_version
  super(cmd, size)
  @name            = name
  @str_offset      = str_offset
  @timestamp       = timestamp
  @current_version = current_version
  @compat_version  = compat_version
end