Lines Matching full:note
122 """Adds a note to the ELF."""
124 note = get_arch_note(self.endianness, len(n_name), len(n_desc))
125 note.n_namesz = len(n_name) + 1
126 note.n_descsz = len(n_desc)
127 note.n_name = n_name.encode()
128 note.n_type = n_type
134 ctypes.memmove(note.n_desc, n_desc.encode(), len(n_desc))
136 self.notes.append(note)
137 self.segments[0].p_filesz += ctypes.sizeof(note)
138 self.segments[0].p_memsz += ctypes.sizeof(note)
142 """Adds a vmcoreinfo note to the ELF dump."""
143 # compute the header size, and copy that many bytes from the note
150 # now get the full note
151 note = get_arch_note(self.endianness,
153 ctypes.memmove(ctypes.pointer(note), vmcoreinfo, ctypes.sizeof(note))
155 self.notes.append(note)
156 self.segments[0].p_filesz += ctypes.sizeof(note)
157 self.segments[0].p_memsz += ctypes.sizeof(note)
179 Note 0..N
191 for note in self.notes:
192 elf_file.write(note)
196 """Returns a Note class with the specified endianness."""
205 class Note(superclass): class
206 """Represents an ELF note, includes the content."""
213 return Note()
494 fake ELF note is written instead, only to keep the ELF parser of "crash"