class SectionName
Public Class Methods
new(_fh, _st)
click to toggle source
Calls superclass method
Base::new
# File lib/elfcat/sectionname.rb, line 2 def initialize _fh, _st super() parse _fh, _st end
Public Instance Methods
debug()
click to toggle source
# File lib/elfcat/sectionname.rb, line 7 def debug @data.each_with_index do |x, i| index_s = sprintf("%4d", i) name_s = sprintf("%s", x) puts "#{index_s} | #{name_s}" end end
Private Instance Methods
parse(_fh, _st)
click to toggle source
# File lib/elfcat/sectionname.rb, line 17 def parse _fh, _st entry = _st[_fh.e_shstrndx] base_elf_address = entry.sh_offset length = entry.sh_size @data = parse_slice(base_elf_address, length) end