Class: MachO::LoadCommands::LinkeditDataCommand

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

Overview

A load command representing the offsets and sizes of a blob of data in the __LINKEDIT segment. Corresponds to LC_CODE_SIGNATURE, LC_SEGMENT_SPLIT_INFO, LC_FUNCTION_STARTS, LC_DATA_IN_CODE, LC_DYLIB_CODE_SIGN_DRS, and LC_LINKER_OPTIMIZATION_HINT.

Constant Summary collapse

FORMAT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

"L=4".freeze
SIZEOF =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

16

Instance Attribute Summary collapse

Attributes inherited from LoadCommand

#cmd, #cmdsize, #view

Instance Method Summary collapse

Methods inherited from LoadCommand

create, new_from_bin, #offset, #serializable?, #serialize, #to_s, #type

Methods inherited from MachOStructure

bytesize, new_from_bin

Constructor Details

#initialize(view, cmd, cmdsize, dataoff, datasize) ⇒ LinkeditDataCommand

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



1009
1010
1011
1012
1013
# File 'lib/macho/load_commands.rb', line 1009

def initialize(view, cmd, cmdsize, dataoff, datasize)
  super(view, cmd, cmdsize)
  @dataoff = dataoff
  @datasize = datasize
end

Instance Attribute Details

#dataoffInteger (readonly)

Returns offset to the data in the __LINKEDIT segment.

Returns:

  • (Integer)

    offset to the data in the __LINKEDIT segment



995
996
997
# File 'lib/macho/load_commands.rb', line 995

def dataoff
  @dataoff
end

#datasizeInteger (readonly)

Returns size of the data in the __LINKEDIT segment.

Returns:

  • (Integer)

    size of the data in the __LINKEDIT segment



998
999
1000
# File 'lib/macho/load_commands.rb', line 998

def datasize
  @datasize
end