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); }
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); }
private IEnumerable <ElfNote> GetNotes(ELFNoteType type) { return(ElfFile.Notes.Where(n => n.Type == type)); }