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



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

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



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

field :offset, :uint64

#sizeInteger

Returns the size, in bytes, of the note.

Returns:

  • (Integer)

    the size, in bytes, of the note



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

field :size, :uint64

#to_hHash

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

Returns:



1436
1437
1438
1439
1440
1441
1442
# File 'lib/macho/load_commands.rb', line 1436

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