Class: MachO::LoadCommands::LinkeditDataCommand
- Inherits:
-
LoadCommand
- Object
- MachOStructure
- LoadCommand
- MachO::LoadCommands::LinkeditDataCommand
- 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, LC_LINKER_OPTIMIZATION_HINT, LC_DYLD_EXPORTS_TRIE, or LC_DYLD_CHAINED_FIXUPS.
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"
- 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
-
#dataoff ⇒ Integer
readonly
Offset to the data in the __LINKEDIT segment.
-
#datasize ⇒ Integer
readonly
Size of the data in the __LINKEDIT segment.
Attributes inherited from LoadCommand
Instance Method Summary collapse
-
#initialize(view, cmd, cmdsize, dataoff, datasize) ⇒ LinkeditDataCommand
constructor
private
A new instance of LinkeditDataCommand.
-
#to_h ⇒ Hash
A hash representation of this LinkeditDataCommand.
Methods inherited from LoadCommand
create, new_from_bin, #offset, #serializable?, #serialize, #to_s, #type
Methods inherited from MachOStructure
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.
1219 1220 1221 1222 1223 |
# File 'lib/macho/load_commands.rb', line 1219 def initialize(view, cmd, cmdsize, dataoff, datasize) super(view, cmd, cmdsize) @dataoff = dataoff @datasize = datasize end |
Instance Attribute Details
#dataoff ⇒ Integer (readonly)
Returns offset to the data in the __LINKEDIT segment.
1205 1206 1207 |
# File 'lib/macho/load_commands.rb', line 1205 def dataoff @dataoff end |
#datasize ⇒ Integer (readonly)
Returns size of the data in the __LINKEDIT segment.
1208 1209 1210 |
# File 'lib/macho/load_commands.rb', line 1208 def datasize @datasize end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this MachO::LoadCommands::LinkeditDataCommand.
1226 1227 1228 1229 1230 1231 |
# File 'lib/macho/load_commands.rb', line 1226 def to_h { "dataoff" => dataoff, "datasize" => datasize, }.merge super end |