Class: MachO::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.

Instance Attribute Summary collapse

Attributes inherited from LoadCommand

#cmd, #cmdsize, #offset

Instance Method Summary collapse

Methods inherited from LoadCommand

new_from_bin, #to_s

Methods inherited from MachOStructure

bytesize, new_from_bin

Constructor Details

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

Returns a new instance of LinkeditDataCommand.



739
740
741
742
743
# File 'lib/macho/load_commands.rb', line 739

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

Instance Attribute Details

#dataoffFixnum (readonly)

Returns offset to the data in the __LINKEDIT segment.

Returns:

  • (Fixnum)

    offset to the data in the __LINKEDIT segment



730
731
732
# File 'lib/macho/load_commands.rb', line 730

def dataoff
  @dataoff
end

#datasizeFixnum (readonly)

Returns size of the data in the __LINKEDIT segment.

Returns:

  • (Fixnum)

    size of the data in the __LINKEDIT segment



733
734
735
# File 'lib/macho/load_commands.rb', line 733

def datasize
  @datasize
end