class ELFTools::Note::Note
Class of a note.
Attributes
header[R]
offset[R]
stream[R]
Public Class Methods
new(header, stream, offset)
click to toggle source
Instantiate a {ELFTools::Note::Note} object. @param [ELF_Nhdr] header The note header. @param [#pos=, read] stream Streaming object. @param [Integer] offset
Start address of this note, includes the header.
# File lib/elftools/note.rb, line 97 def initialize(header, stream, offset) @header = header @stream = stream @offset = offset end
Public Instance Methods
desc()
click to toggle source
Description of this note. @return [String] The description.
# File lib/elftools/note.rb, line 114 def desc return @desc if instance_variable_defined?(:@desc) stream.pos = @offset + SIZE_OF_NHDR + Util.align(header.n_namesz, 2) @desc = stream.read(header.n_descsz) end
Also aliased as: description
name()
click to toggle source
Name of this note. @return [String] The name.
# File lib/elftools/note.rb, line 105 def name return @name if defined?(@name) stream.pos = @offset + SIZE_OF_NHDR @name = stream.read(header.n_namesz)[0..-2] end