Class: MachO::LoadCommands::DysymtabCommand

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

Overview

A load command containing symbolic information needed to support data structures used by the dynamic link editor. Corresponds to LC_DYSYMTAB.

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

80

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, ilocalsym, nlocalsym, iextdefsym, nextdefsym, iundefsym, nundefsym, tocoff, ntoc, modtaboff, nmodtab, extrefsymoff, nextrefsyms, indirectsymoff, nindirectsyms, extreloff, nextrel, locreloff, nlocrel) ⇒ DysymtabCommand

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.

ugh



985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
# File 'lib/macho/load_commands.rb', line 985

def initialize(view, cmd, cmdsize, ilocalsym, nlocalsym, iextdefsym,
               nextdefsym, iundefsym, nundefsym, tocoff, ntoc, modtaboff,
               nmodtab, extrefsymoff, nextrefsyms, indirectsymoff,
               nindirectsyms, extreloff, nextrel, locreloff, nlocrel)
  super(view, cmd, cmdsize)
  @ilocalsym = ilocalsym
  @nlocalsym = nlocalsym
  @iextdefsym = iextdefsym
  @nextdefsym = nextdefsym
  @iundefsym = iundefsym
  @nundefsym = nundefsym
  @tocoff = tocoff
  @ntoc = ntoc
  @modtaboff = modtaboff
  @nmodtab = nmodtab
  @extrefsymoff = extrefsymoff
  @nextrefsyms = nextrefsyms
  @indirectsymoff = indirectsymoff
  @nindirectsyms = nindirectsyms
  @extreloff = extreloff
  @nextrel = nextrel
  @locreloff = locreloff
  @nlocrel = nlocrel
end

Instance Attribute Details

#extrefsymoffInteger (readonly)

Returns the file offset to the referenced symbol table.

Returns:

  • (Integer)

    the file offset to the referenced symbol table



952
953
954
# File 'lib/macho/load_commands.rb', line 952

def extrefsymoff
  @extrefsymoff
end

#extreloffInteger (readonly)

Returns the file offset to the external relocation entries.

Returns:

  • (Integer)

    the file offset to the external relocation entries



964
965
966
# File 'lib/macho/load_commands.rb', line 964

def extreloff
  @extreloff
end

#iextdefsymInteger (readonly)

Returns the index to externally defined symbols.

Returns:

  • (Integer)

    the index to externally defined symbols



928
929
930
# File 'lib/macho/load_commands.rb', line 928

def iextdefsym
  @iextdefsym
end

#ilocalsymInteger (readonly)

Returns the index to local symbols.

Returns:

  • (Integer)

    the index to local symbols



922
923
924
# File 'lib/macho/load_commands.rb', line 922

def ilocalsym
  @ilocalsym
end

#indirectsymoffInteger (readonly)

Returns the file offset to the indirect symbol table.

Returns:

  • (Integer)

    the file offset to the indirect symbol table



958
959
960
# File 'lib/macho/load_commands.rb', line 958

def indirectsymoff
  @indirectsymoff
end

#iundefsymInteger (readonly)

Returns the index to undefined symbols.

Returns:

  • (Integer)

    the index to undefined symbols



934
935
936
# File 'lib/macho/load_commands.rb', line 934

def iundefsym
  @iundefsym
end

#locreloffInteger (readonly)

Returns the file offset to the local relocation entries.

Returns:

  • (Integer)

    the file offset to the local relocation entries



970
971
972
# File 'lib/macho/load_commands.rb', line 970

def locreloff
  @locreloff
end

#modtaboffInteger (readonly)

Returns the file offset to the module table.

Returns:

  • (Integer)

    the file offset to the module table



946
947
948
# File 'lib/macho/load_commands.rb', line 946

def modtaboff
  @modtaboff
end

#nextdefsymInteger (readonly)

Returns the number of externally defined symbols.

Returns:

  • (Integer)

    the number of externally defined symbols



931
932
933
# File 'lib/macho/load_commands.rb', line 931

def nextdefsym
  @nextdefsym
end

#nextrefsymsInteger (readonly)

Returns the number of entries in the referenced symbol table.

Returns:

  • (Integer)

    the number of entries in the referenced symbol table



955
956
957
# File 'lib/macho/load_commands.rb', line 955

def nextrefsyms
  @nextrefsyms
end

#nextrelInteger (readonly)

Returns the number of external relocation entries.

Returns:

  • (Integer)

    the number of external relocation entries



967
968
969
# File 'lib/macho/load_commands.rb', line 967

def nextrel
  @nextrel
end

#nindirectsymsInteger (readonly)

Returns the number of entries in the indirect symbol table.

Returns:

  • (Integer)

    the number of entries in the indirect symbol table



961
962
963
# File 'lib/macho/load_commands.rb', line 961

def nindirectsyms
  @nindirectsyms
end

#nlocalsymInteger (readonly)

Returns the number of local symbols.

Returns:

  • (Integer)

    the number of local symbols



925
926
927
# File 'lib/macho/load_commands.rb', line 925

def nlocalsym
  @nlocalsym
end

#nlocrelInteger (readonly)

Returns the number of local relocation entries.

Returns:

  • (Integer)

    the number of local relocation entries



973
974
975
# File 'lib/macho/load_commands.rb', line 973

def nlocrel
  @nlocrel
end

#nmodtabInteger (readonly)

Returns the number of entries in the module table.

Returns:

  • (Integer)

    the number of entries in the module table



949
950
951
# File 'lib/macho/load_commands.rb', line 949

def nmodtab
  @nmodtab
end

#ntocInteger (readonly)

Returns the number of entries in the table of contents.

Returns:

  • (Integer)

    the number of entries in the table of contents



943
944
945
# File 'lib/macho/load_commands.rb', line 943

def ntoc
  @ntoc
end

#nundefsymInteger (readonly)

Returns the number of undefined symbols.

Returns:

  • (Integer)

    the number of undefined symbols



937
938
939
# File 'lib/macho/load_commands.rb', line 937

def nundefsym
  @nundefsym
end

#tocoffInteger (readonly)

Returns the file offset to the table of contents.

Returns:

  • (Integer)

    the file offset to the table of contents



940
941
942
# File 'lib/macho/load_commands.rb', line 940

def tocoff
  @tocoff
end

Instance Method Details

#to_hHash

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

Returns:



1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
# File 'lib/macho/load_commands.rb', line 1011

def to_h
  {
    "ilocalsym" => ilocalsym,
    "nlocalsym" => nlocalsym,
    "iextdefsym" => iextdefsym,
    "nextdefsym" => nextdefsym,
    "iundefsym" => iundefsym,
    "nundefsym" => nundefsym,
    "tocoff" => tocoff,
    "ntoc" => ntoc,
    "modtaboff" => modtaboff,
    "nmodtab" => nmodtab,
    "extrefsymoff" => extrefsymoff,
    "nextrefsyms" => nextrefsyms,
    "indirectsymoff" => indirectsymoff,
    "nindirectsyms" => nindirectsyms,
    "extreloff" => extreloff,
    "nextrel" => nextrel,
    "locreloff" => locreloff,
    "nlocrel" => nlocrel,
  }.merge super
end