Exemple #1
0
 private byte[] ReadBuildIdNote(Reader noteReader)
 {
     if (noteReader != null)
     {
         var noteList = new ELFNoteList(noteReader);
         foreach (ELFNote note in noteList.Notes)
         {
             ELFNoteType type = note.Header.Type;
             if (type == ELFNoteType.PrpsInfo && note.Name.Equals("GNU"))
             {
                 return(note.Contents.Read(0, (uint)note.Contents.Length));
             }
         }
     }
     return(null);
 }
Exemple #2
0
 private byte[] ReadBuildID()
 {
     foreach (ELFProgramSegment segment in Segments)
     {
         if (segment.Header.Type == ELFProgramHeaderType.Note)
         {
             ELFNoteList noteList = new ELFNoteList(segment.Contents);
             foreach (ELFNote note in noteList.Notes)
             {
                 ELFNoteType type = note.Header.Type;
                 if (type == ELFNoteType.PrpsInfo && note.Name.Equals("GNU"))
                 {
                     return(note.Contents.Read(0, (uint)note.Contents.Length));
                 }
             }
         }
     }
     return(null);
 }
Exemple #3
0
 private IEnumerable <ElfNote> GetNotes(ELFNoteType type)
 {
     return(ElfFile.Notes.Where(n => n.Type == type));
 }