Class: MachO::SymtabCommand

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

Overview

A load command containing the offsets and sizes of the link-edit 4.3BSD “stab” style symbol table information. Corresponds to LC_SYMTAB.

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, symoff, nsyms, stroff, strsize) ⇒ SymtabCommand

Returns a new instance of SymtabCommand.



716
717
718
719
720
721
722
# File 'lib/macho/load_commands.rb', line 716

def initialize(offset, cmd, cmdsize, symoff, nsyms, stroff, strsize)
  super(offset, cmd, cmdsize)
  @symoff = symoff
  @nsyms = nsyms
  @stroff = stroff
  @strsize = strsize
end

Instance Attribute Details

#nsymsFixnum (readonly)

Returns the number of symbol table entries.

Returns:

  • (Fixnum)

    the number of symbol table entries



704
705
706
# File 'lib/macho/load_commands.rb', line 704

def nsyms
  @nsyms
end

#stroffObject (readonly)

Returns the string table’s offset.

Returns:

  • the string table’s offset



707
708
709
# File 'lib/macho/load_commands.rb', line 707

def stroff
  @stroff
end

#strsizeObject (readonly)

Returns the string table size in bytes.

Returns:

  • the string table size in bytes



710
711
712
# File 'lib/macho/load_commands.rb', line 710

def strsize
  @strsize
end

#symoffFixnum (readonly)

Returns the symbol table’s offset.

Returns:

  • (Fixnum)

    the symbol table’s offset



701
702
703
# File 'lib/macho/load_commands.rb', line 701

def symoff
  @symoff
end