Class: ELFTools::Sections::StrTabSection

Inherits:
Section
  • Object
show all
Defined in:
lib/elftools/sections/str_tab_section.rb

Overview

Class of string table section. Usually for section .strtab and .dynstr, which record names.

Instance Attribute Summary

Attributes inherited from Section

#header, #stream

Instance Method Summary collapse

Methods inherited from Section

create, #data, #initialize, #name, #null?, #type

Constructor Details

This class inherits a constructor from ELFTools::Sections::Section

Instance Method Details

#name_at(offset) ⇒ String

Return the section or symbol name.

Parameters:

  • offset (Integer)

    Usually from shdr.sh_name or sym.st_name.

Returns:

  • (String)

    The name without null bytes.



16
17
18
# File 'lib/elftools/sections/str_tab_section.rb', line 16

def name_at(offset)
  Util.cstring(stream, header.sh_offset + offset)
end