class MachO::LoadCommands::DylinkerCommand
A load command representing some aspect of the dynamic linker, depending on filetype. Corresponds to LC_ID_DYLINKER, LC_LOAD_DYLINKER, and LC_DYLD_ENVIRONMENT.
Public Instance Methods
serialize(context)
click to toggle source
@param context [SerializationContext]
the context
@return [String] the serialized fields of the load command @api private
# File lib/macho/load_commands.rb, line 665 def serialize(context) format = Utils.specialize_format(self.class.format, context.endianness) string_payload, string_offsets = Utils.pack_strings(self.class.bytesize, context.alignment, :name => name.to_s) cmdsize = self.class.bytesize + string_payload.bytesize [cmd, cmdsize, string_offsets[:name]].pack(format) + string_payload end
to_h()
click to toggle source
@return [Hash] a hash representation of this {DylinkerCommand}
Calls superclass method
MachO::LoadCommands::LoadCommand#to_h
# File lib/macho/load_commands.rb, line 675 def to_h { "name" => name.to_h, }.merge super end