class ELFTools::Sections::Symbol
Class of symbol.
XXX: Should this class be defined in an independent file?
Attributes
header[R]
stream[R]
Public Class Methods
new(header, stream, symstr: nil)
click to toggle source
Instantiate a {ELFTools::Sections::Symbol} object. @param [ELFTools::Structs::ELF32_sym, ELFTools::Structs::ELF64_sym] header
The symbol header.
@param [#pos=, read] stream The streaming object. @param [ELFTools::Sections::StrTabSection, Proc] symstr
The symbol string section. If +Proc+ is given, it will be called at the first time access {Symbol#name}.
# File lib/elftools/sections/sym_tab_section.rb, line 114 def initialize(header, stream, symstr: nil) @header = header @stream = stream @symstr = symstr end
Public Instance Methods
name()
click to toggle source
Return the symbol name. @return [String] The name.
# File lib/elftools/sections/sym_tab_section.rb, line 122 def name @name ||= @symstr.call.name_at(header.st_name) end