Class: ELFTools::Sections::Symbol
- Inherits:
-
Object
- Object
- ELFTools::Sections::Symbol
- Defined in:
- lib/elftools/sections/sym_tab_section.rb
Overview
Class of symbol.
XXX: Should this class be defined in an independent file?
Instance Attribute Summary collapse
-
#header ⇒ ELFTools::Structs::ELF32_sym, ELFTools::Structs::ELF64_sym
readonly
Section header.
-
#stream ⇒ #pos=, #read
readonly
Streaming object.
Instance Method Summary collapse
-
#initialize(header, stream, symstr: nil) ⇒ Symbol
constructor
Instantiate a Symbol object.
-
#name ⇒ String
Return the symbol name.
Constructor Details
#initialize(header, stream, symstr: nil) ⇒ Symbol
Instantiate a ELFTools::Sections::Symbol object.
114 115 116 117 118 |
# File 'lib/elftools/sections/sym_tab_section.rb', line 114 def initialize(header, stream, symstr: nil) @header = header @stream = stream @symstr = symstr end |
Instance Attribute Details
#header ⇒ ELFTools::Structs::ELF32_sym, ELFTools::Structs::ELF64_sym (readonly)
Returns Section header.
103 104 105 |
# File 'lib/elftools/sections/sym_tab_section.rb', line 103 def header @header end |
#stream ⇒ #pos=, #read (readonly)
Returns Streaming object.
104 105 106 |
# File 'lib/elftools/sections/sym_tab_section.rb', line 104 def stream @stream end |
Instance Method Details
#name ⇒ String
Return the symbol name.
122 123 124 |
# File 'lib/elftools/sections/sym_tab_section.rb', line 122 def name @name ||= @symstr.call.name_at(header.st_name) end |