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.
@see MachOStructure::FORMAT @api private
@see MachOStructure::SIZEOF @api private
@return [LCStr] the path to add to the run path as an LCStr
@api private
# File lib/macho/load_commands.rb, line 967 def initialize(view, cmd, cmdsize, path) super(view, cmd, cmdsize) @path = LCStr.new(self, path) end
@param context [SerializationContext] the context @return [String] the serialized fields of the load command @api private
# File lib/macho/load_commands.rb, line 975 def serialize(context) format = Utils.specialize_format(FORMAT, context.endianness) string_payload, string_offsets = Utils.pack_strings(SIZEOF, context.alignment, :path => path.to_s) cmdsize = SIZEOF + string_payload.bytesize [cmd, cmdsize, string_offsets[:path]].pack(format) + string_payload end