Lines Matching defs:note
97 static boolean_t __elfN(freebsd_trans_osrel)(const Elf_Note *note,
99 static boolean_t kfreebsd_trans_osrel(const Elf_Note *note, int32_t *osrel);
161 __elfN(freebsd_trans_osrel)(const Elf_Note *note, int32_t *osrel)
165 p = (uintptr_t)(note + 1);
166 p += roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE);
185 kfreebsd_trans_osrel(const Elf_Note *note, int32_t *osrel)
190 p = (uintptr_t)(note + 1);
191 p += roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE);
272 * field, and (4) the ".note.ABI-tag" ELF section.
275 /* Look for an ".note.ABI-tag" ELF section */
285 * If note checker claimed the binary, but the
292 * our note and, optionally, header.
1135 TAILQ_ENTRY(note_info) link; /* Link to the next note info. */
1643 /* The note segement. */
1678 notesize = sizeof(Elf_Note) + /* note header */
1680 /* note name */
1681 roundup2(size, ELF_NOTE_ROUNDSIZE); /* note description */
1702 Elf_Note *note;
1708 note = (Elf_Note *)buf;
1709 note->n_namesz = sizeof(FREEBSD_ABI_VENDOR);
1710 note->n_descsz = size;
1711 note->n_type = type;
1712 buf += sizeof(*note);
1720 notesize = sizeof(Elf_Note) + /* note header */
1722 /* note name */
1723 roundup2(size, ELF_NOTE_ROUNDSIZE); /* note description */
1731 Elf_Note note;
1740 note.n_namesz = sizeof(FREEBSD_ABI_VENDOR);
1741 note.n_descsz = ninfo->outsize;
1742 note.n_type = ninfo->type;
1744 sbuf_bcat(sb, ¬e, sizeof(note));
1748 if (note.n_descsz == 0)
1757 descsz = roundup(note.n_descsz, ELF_NOTE_ROUNDSIZE);
1760 * It is expected that individual note emitters will correctly
1776 __func__, (unsigned)note.n_type, new_len, descsz,
1777 (unsigned)note.n_type));
1782 * Miscellaneous note out functions.
2208 const Elf_Note *note, *note0, *note_end;
2231 note = note0 = (const Elf_Note *)buf;
2234 note = note0 = (const Elf_Note *)(imgp->image_header +
2240 for (i = 0; i < 100 && note >= note0 && note < note_end; i++) {
2241 if (!aligned(note, Elf32_Addr) || (const char *)note_end -
2242 (const char *)note < sizeof(Elf_Note)) {
2246 if (note->n_namesz != checknote->hdr.n_namesz ||
2247 note->n_descsz != checknote->hdr.n_descsz ||
2248 note->n_type != checknote->hdr.n_type)
2250 note_name = (const char *)(note + 1);
2258 * from the ELF OSABI-note if necessary.
2262 res = checknote->trans_osrel(note, osrel);
2268 note = (const Elf_Note *)((const char *)(note + 1) +
2269 roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) +
2270 roundup2(note->n_descsz, ELF_NOTE_ROUNDSIZE));
2279 * Try to find the appropriate ABI-note section for checknote,
2280 * fetch the osreldate for binary from the ELF OSABI-note. Only the