Class: MachO::LoadCommands::DyldInfoCommand

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

Overview

A load command containing the file offsets and sizes of the new compressed form of the information dyld needs to load the image. Corresponds to LC_DYLD_INFO and LC_DYLD_INFO_ONLY.

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=12".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.

48

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, rebase_off, rebase_size, bind_off, bind_size, weak_bind_off, weak_bind_size, lazy_bind_off, lazy_bind_size, export_off, export_size) ⇒ DyldInfoCommand

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



1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
# File 'lib/macho/load_commands.rb', line 1504

def initialize(view, cmd, cmdsize, rebase_off, rebase_size, bind_off,
               bind_size, weak_bind_off, weak_bind_size, lazy_bind_off,
               lazy_bind_size, export_off, export_size)
  super(view, cmd, cmdsize)
  @rebase_off = rebase_off
  @rebase_size = rebase_size
  @bind_off = bind_off
  @bind_size = bind_size
  @weak_bind_off = weak_bind_off
  @weak_bind_size = weak_bind_size
  @lazy_bind_off = lazy_bind_off
  @lazy_bind_size = lazy_bind_size
  @export_off = export_off
  @export_size = export_size
end

Instance Attribute Details

#bind_offInteger (readonly)

Returns the file offset to the binding information.

Returns:

  • (Integer)

    the file offset to the binding information



1472
1473
1474
# File 'lib/macho/load_commands.rb', line 1472

def bind_off
  @bind_off
end

#bind_sizeInteger (readonly)

Returns the size of the binding information.

Returns:

  • (Integer)

    the size of the binding information



1475
1476
1477
# File 'lib/macho/load_commands.rb', line 1475

def bind_size
  @bind_size
end

#export_offInteger (readonly)

Returns the file offset to the export information.

Returns:

  • (Integer)

    the file offset to the export information



1490
1491
1492
# File 'lib/macho/load_commands.rb', line 1490

def export_off
  @export_off
end

#export_sizeInteger (readonly)

Returns the size of the export information.

Returns:

  • (Integer)

    the size of the export information



1493
1494
1495
# File 'lib/macho/load_commands.rb', line 1493

def export_size
  @export_size
end

#lazy_bind_offInteger (readonly)

Returns the file offset to the lazy binding information.

Returns:

  • (Integer)

    the file offset to the lazy binding information



1484
1485
1486
# File 'lib/macho/load_commands.rb', line 1484

def lazy_bind_off
  @lazy_bind_off
end

#lazy_bind_sizeInteger (readonly)

Returns the size of the lazy binding information.

Returns:

  • (Integer)

    the size of the lazy binding information



1487
1488
1489
# File 'lib/macho/load_commands.rb', line 1487

def lazy_bind_size
  @lazy_bind_size
end

#rebase_offInteger (readonly)

Returns the file offset to the rebase information.

Returns:

  • (Integer)

    the file offset to the rebase information



1466
1467
1468
# File 'lib/macho/load_commands.rb', line 1466

def rebase_off
  @rebase_off
end

#rebase_sizeInteger (readonly)

Returns the size of the rebase information.

Returns:

  • (Integer)

    the size of the rebase information



1469
1470
1471
# File 'lib/macho/load_commands.rb', line 1469

def rebase_size
  @rebase_size
end

#weak_bind_offInteger (readonly)

Returns the file offset to the weak binding information.

Returns:

  • (Integer)

    the file offset to the weak binding information



1478
1479
1480
# File 'lib/macho/load_commands.rb', line 1478

def weak_bind_off
  @weak_bind_off
end

#weak_bind_sizeInteger (readonly)

Returns the size of the weak binding information.

Returns:

  • (Integer)

    the size of the weak binding information



1481
1482
1483
# File 'lib/macho/load_commands.rb', line 1481

def weak_bind_size
  @weak_bind_size
end

Instance Method Details

#to_hHash

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

Returns:



1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
# File 'lib/macho/load_commands.rb', line 1521

def to_h
  {
    "rebase_off" => rebase_off,
    "rebase_size" => rebase_size,
    "bind_off" => bind_off,
    "bind_size" => bind_size,
    "weak_bind_off" => weak_bind_off,
    "weak_bind_size" => weak_bind_size,
    "lazy_bind_off" => lazy_bind_off,
    "lazy_bind_size" => lazy_bind_size,
    "export_off" => export_off,
    "export_size" => export_size,
  }.merge super
end