Class: MachO::LoadCommands::NoteCommand

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

Overview

A load command containing an owner name and offset/size for an arbitrary data region. Corresponds to LC_NOTE.

Instance Method Summary collapse

Methods inherited from LoadCommand

#cmd, #cmdsize, create, new_from_bin, #serializable?, #serialize, #to_s, #type, #view

Methods inherited from MachOStructure

bytesize, format, #initialize, new_from_bin

Constructor Details

This class inherits a constructor from MachO::MachOStructure

Instance Method Details

#data_ownerString

Returns the name of the owner for this note.

Returns:

  • (String)

    the name of the owner for this note



1328
# File 'lib/macho/load_commands.rb', line 1328

field :data_owner, :string, :padding => :null, :size => 16, :to_s => true

#offsetInteger

Returns the offset, within the file, of the note.

Returns:

  • (Integer)

    the offset, within the file, of the note



1331
# File 'lib/macho/load_commands.rb', line 1331

field :offset, :uint64

#sizeInteger

Returns the size, in bytes, of the note.

Returns:

  • (Integer)

    the size, in bytes, of the note



1334
# File 'lib/macho/load_commands.rb', line 1334

field :size, :uint64

#to_hHash

Returns a hash representation of this MachO::LoadCommands::NoteCommand.

Returns:



1337
1338
1339
1340
1341
1342
1343
# File 'lib/macho/load_commands.rb', line 1337

def to_h
  {
    "data_owner" => data_owner,
    "offset" => offset,
    "size" => size,
  }.merge super
end