class MachO::LoadCommands::TwolevelHintsCommand::TwolevelHintsTable
A representation of the two-level namespace lookup hints table exposed by a {TwolevelHintsCommand} (‘LC_TWOLEVEL_HINTS`).
Attributes
hints[R]
@return [Array<TwolevelHint>] all hints in the table
Public Class Methods
new(view, htoffset, nhints)
click to toggle source
@param view [MachO::MachOView] the view into the current Mach-O @param htoffset [Integer] the offset of the hints table @param nhints [Integer] the number of two-level hints in the table @api private
# File lib/macho/load_commands.rb, line 981 def initialize(view, htoffset, nhints) format = Utils.specialize_format("L=#{nhints}", view.endianness) raw_table = view.raw_data[htoffset, nhints * 4] blobs = raw_table.unpack(format) @hints = blobs.map { |b| TwolevelHint.new(b) } end