def each_notes
      return enum_for(:each_notes) unless block_given?

      @notes_offset_map ||= {}
      cur = note_start
      notes = []
      while cur < note_start + note_total_size
        stream.pos = cur
        @notes_offset_map[cur] ||= create_note(cur)
        note = @notes_offset_map[cur]
        # name and desc size needs to be 4-bytes align
        name_size = Util.align(note.header.n_namesz, 2)
        desc_size = Util.align(note.header.n_descsz, 2)
        cur += SIZE_OF_NHDR + name_size + desc_size
        notes << note
        yield note
      end
      notes
    end
def each_notes
      return enum_for(:each_notes) unless block_given?

      @notes_offset_map ||= {}
      cur = note_start
      notes = []
      while cur < note_start + note_total_size
        stream.pos = cur
        @notes_offset_map[cur] ||= create_note(cur)
        note = @notes_offset_map[cur]
        # name and desc size needs to be 4-bytes align
        name_size = Util.align(note.header.n_namesz, 2)
        desc_size = Util.align(note.header.n_descsz, 2)
        cur += SIZE_OF_NHDR + name_size + desc_size
        notes << note
        yield note
      end
      notes
    end
Iterate all notes in a note section or segment.

 Structure of notes are:
   +---------------+
   | Note 1 header |
   +---------------+
   |  Note 1 name  |
   +---------------+
   |  Note 1 desc  |
   +---------------+
   | Note 2 header |
   +---------------+
   |      ...      |
   +---------------+

 @note
   This method assume following methods exist:
     stream
     note_start
     note_total_size
 @return [Enumerator<ELFTools::Note::Note>, Array<ELFTools::Note::Note>]
   If block is not given, an enumerator will be returned.
   Otherwise, return the array of notes.