Lines Matching full:note
95 static bool __elfN(freebsd_trans_osrel)(const Elf_Note *note,
97 static bool kfreebsd_trans_osrel(const Elf_Note *note, int32_t *osrel);
239 __elfN(freebsd_trans_osrel)(const Elf_Note *note, int32_t *osrel)
243 p = (uintptr_t)(note + 1);
244 p += roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE);
262 kfreebsd_trans_osrel(const Elf_Note *note, int32_t *osrel)
267 p = (uintptr_t)(note + 1);
268 p += roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE);
351 * field, and (4) the ".note.ABI-tag" ELF section.
354 /* Look for an ".note.ABI-tag" ELF section */
375 * If note checker claimed the binary, but the
382 * our note and, optionally, header.
888 * to the map. Note that function only allocates the address, it is
950 * Note that obreak() assumes that data_addr + data_size == end
1551 int type; /* Note type. */
1556 TAILQ_ENTRY(note_info) link; /* Link to the next note info. */
1775 * Note that read-only segments related to the elf binary
1975 /* The note segement. */
2005 ninfo->type = regset->note;
2012 notesize = sizeof(Elf_Note) + /* note header */
2014 /* note name */
2015 roundup2(size, ELF_NOTE_ROUNDSIZE); /* note description */
2041 notesize = sizeof(Elf_Note) + /* note header */
2043 /* note name */
2044 roundup2(size, ELF_NOTE_ROUNDSIZE); /* note description */
2065 Elf_Note *note;
2071 note = (Elf_Note *)buf;
2072 note->n_namesz = sizeof(FREEBSD_ABI_VENDOR);
2073 note->n_descsz = size;
2074 note->n_type = type;
2075 buf += sizeof(*note);
2083 notesize = sizeof(Elf_Note) + /* note header */
2085 /* note name */
2086 roundup2(size, ELF_NOTE_ROUNDSIZE); /* note description */
2094 Elf_Note note;
2106 note.n_namesz = strlen(sv->sv_elf_core_abi_vendor) + 1;
2107 note.n_descsz = ninfo->outsize;
2108 note.n_type = ninfo->type;
2110 sbuf_bcat(sb, ¬e, sizeof(note));
2115 if (note.n_descsz == 0)
2133 descsz = roundup(note.n_descsz, ELF_NOTE_ROUNDSIZE);
2136 * It is expected that individual note emitters will correctly
2148 KASSERT(new_len == descsz, ("%s: Note type %u changed as we "
2152 __func__, (unsigned)note.n_type, new_len, descsz,
2153 (unsigned)note.n_type));
2158 * Miscellaneous note out functions.
2297 .note = NT_PRSTATUS,
2341 .note = NT_FPREGSET,
2366 .note = NT_THRMISC,
2408 .note = NT_PTLWPINFO,
2424 /* NT_PRSTATUS must be the first register set note. */
2439 if (regset->note == NT_PRSTATUS)
2725 const Elf_Note *note, *note0, *note_end;
2750 note = note0 = (const Elf_Note *)buf;
2753 note = note0 = (const Elf_Note *)(imgp->image_header +
2759 for (i = 0; i < MAX_NOTES_LOOP && note >= note0 && note < note_end;
2761 if (!aligned(note, Elf32_Addr)) {
2762 uprintf("Unaligned ELF note\n");
2765 if ((const char *)note_end - (const char *)note <
2767 uprintf("ELF note to short\n");
2770 if (note->n_namesz != checknote->n_namesz ||
2771 note->n_descsz != checknote->n_descsz ||
2772 note->n_type != checknote->n_type)
2774 note_name = (const char *)(note + 1);
2780 if (cb(note, cb_arg, &res))
2783 note = (const Elf_Note *)((const char *)(note + 1) +
2784 roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) +
2785 roundup2(note->n_descsz, ELF_NOTE_ROUNDSIZE));
2788 uprintf("ELF note parser reached %d notes\n", i);
2802 brandnote_cb(const Elf_Note *note, void *arg0, bool *res)
2809 * Fetch the osreldate for binary from the ELF OSABI-note if
2814 arg->brandnote->trans_osrel(note, arg->osrel) : true;
2831 note_fctl_cb(const Elf_Note *note, void *arg0, bool *res)
2838 p = (uintptr_t)(note + 1);
2839 p += roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE);
2848 * Try to find the appropriate ABI-note section for checknote, fetch
2850 * OSABI-note. Only the first page of the image is searched, the same