Class: MachO::RpathCommand

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

Overview

A load command representing an rpath, which specifies a path that should be added to the current run path used to find @rpath prefixed dylibs. Corresponds to LC_RPATH.

Constant Summary collapse

FORMAT =
"VVV"
SIZEOF =
12

Instance Attribute Summary collapse

Attributes inherited from LoadCommand

#cmd, #cmdsize, #offset

Instance Method Summary collapse

Methods inherited from LoadCommand

new_from_bin, #to_s, #type

Methods inherited from MachOStructure

bytesize, new_from_bin

Constructor Details

#initialize(raw_data, offset, cmd, cmdsize, path) ⇒ RpathCommand

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 RpathCommand.



753
754
755
756
# File 'lib/macho/load_commands.rb', line 753

def initialize(raw_data, offset, cmd, cmdsize, path)
	super(raw_data, offset, cmd, cmdsize)
	@path = LCStr.new(raw_data, self, path)
end

Instance Attribute Details

#pathMachO::LoadCommand::LCStr (readonly)

Returns the path to add to the run path as an LCStr.

Returns:



747
748
749
# File 'lib/macho/load_commands.rb', line 747

def path
  @path
end