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) in __elfN()
243 p = (uintptr_t)(note + 1); in __elfN()
244 p += roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE); in __elfN()
262 kfreebsd_trans_osrel(const Elf_Note *note, int32_t *osrel) in kfreebsd_trans_osrel() argument
267 p = (uintptr_t)(note + 1); in kfreebsd_trans_osrel()
268 p += roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE); in kfreebsd_trans_osrel()
351 * field, and (4) the ".note.ABI-tag" ELF section. in __elfN()
354 /* Look for an ".note.ABI-tag" ELF section */ in __elfN()
375 * If note checker claimed the binary, but the in __elfN()
382 * our note and, optionally, header. in __elfN()
888 * to the map. Note that function only allocates the address, it is
950 * Note that obreak() assumes that data_addr + data_size == end in __elfN()
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 in each_dumpable_segment()
1975 /* The note segement. */ in __elfN()
2005 ninfo->type = regset->note; in __elfN()
2012 notesize = sizeof(Elf_Note) + /* note header */ in __elfN()
2014 /* note name */ in __elfN()
2015 roundup2(size, ELF_NOTE_ROUNDSIZE); /* note description */ in __elfN()
2041 notesize = sizeof(Elf_Note) + /* note header */ in __elfN()
2043 /* note name */ in __elfN()
2044 roundup2(size, ELF_NOTE_ROUNDSIZE); /* note description */ in __elfN()
2065 Elf_Note *note; in __elfN() local
2071 note = (Elf_Note *)buf; in __elfN()
2072 note->n_namesz = sizeof(FREEBSD_ABI_VENDOR); in __elfN()
2073 note->n_descsz = size; in __elfN()
2074 note->n_type = type; in __elfN()
2075 buf += sizeof(*note); in __elfN()
2083 notesize = sizeof(Elf_Note) + /* note header */ in __elfN()
2085 /* note name */ in __elfN()
2086 roundup2(size, ELF_NOTE_ROUNDSIZE); /* note description */ in __elfN()
2094 Elf_Note note; in __elfN() local
2106 note.n_namesz = strlen(sv->sv_elf_core_abi_vendor) + 1; in __elfN()
2107 note.n_descsz = ninfo->outsize; in __elfN()
2108 note.n_type = ninfo->type; in __elfN()
2110 sbuf_bcat(sb, ¬e, sizeof(note)); in __elfN()
2115 if (note.n_descsz == 0) in __elfN()
2133 descsz = roundup(note.n_descsz, ELF_NOTE_ROUNDSIZE); in __elfN()
2136 * It is expected that individual note emitters will correctly in __elfN()
2148 KASSERT(new_len == descsz, ("%s: Note type %u changed as we " in __elfN()
2152 __func__, (unsigned)note.n_type, new_len, descsz, in __elfN()
2153 (unsigned)note.n_type)); in __elfN()
2158 * Miscellaneous note out functions.
2297 .note = NT_PRSTATUS,
2341 .note = NT_FPREGSET,
2366 .note = NT_THRMISC,
2408 .note = NT_PTLWPINFO,
2427 /* NT_PRSTATUS must be the first register set note. */ in __elfN()
2442 if (regset->note == NT_PRSTATUS) in __elfN()
2728 const Elf_Note *note, *note0, *note_end; in __elfN() local
2753 note = note0 = (const Elf_Note *)buf; in __elfN()
2756 note = note0 = (const Elf_Note *)(imgp->image_header + in __elfN()
2762 for (i = 0; i < MAX_NOTES_LOOP && note >= note0 && note < note_end; in __elfN()
2764 if (!aligned(note, Elf32_Addr)) { in __elfN()
2765 uprintf("Unaligned ELF note\n"); in __elfN()
2768 if ((const char *)note_end - (const char *)note < in __elfN()
2770 uprintf("ELF note to short\n"); in __elfN()
2773 if (note->n_namesz != checknote->n_namesz || in __elfN()
2774 note->n_descsz != checknote->n_descsz || in __elfN()
2775 note->n_type != checknote->n_type) in __elfN()
2777 note_name = (const char *)(note + 1); in __elfN()
2783 if (cb(note, cb_arg, &res)) in __elfN()
2786 note = (const Elf_Note *)((const char *)(note + 1) + in __elfN()
2787 roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE) + in __elfN()
2788 roundup2(note->n_descsz, ELF_NOTE_ROUNDSIZE)); in __elfN()
2791 uprintf("ELF note parser reached %d notes\n", i); in __elfN()
2805 brandnote_cb(const Elf_Note *note, void *arg0, bool *res) in brandnote_cb() argument
2812 * Fetch the osreldate for binary from the ELF OSABI-note if in brandnote_cb()
2817 arg->brandnote->trans_osrel(note, arg->osrel) : true; in brandnote_cb()
2834 note_fctl_cb(const Elf_Note *note, void *arg0, bool *res) in note_fctl_cb() argument
2841 p = (uintptr_t)(note + 1); in note_fctl_cb()
2842 p += roundup2(note->n_namesz, ELF_NOTE_ROUNDSIZE); in note_fctl_cb()
2851 * Try to find the appropriate ABI-note section for checknote, fetch
2853 * OSABI-note. Only the first page of the image is searched, the same