| /linux/tools/testing/selftests/powerpc/ptrace/ |
| A D | core-pkey.c | 188 static Elf64_Nhdr *next_note(Elf64_Nhdr *nhdr) in next_note() argument 190 return (void *) nhdr + sizeof(*nhdr) + in next_note() 191 __ALIGN_KERNEL(nhdr->n_namesz, 4) + in next_note() 192 __ALIGN_KERNEL(nhdr->n_descsz, 4); in next_note() 200 Elf64_Nhdr *nhdr; in check_core_file() local 232 for (nhdr = p + phdr->p_offset; in check_core_file() 234 nhdr = next_note(nhdr)) in check_core_file() 235 if (nhdr->n_type == NT_PPC_PKEY) in check_core_file() 239 FAIL_IF(nhdr->n_descsz == 0); in check_core_file() 241 p = nhdr; in check_core_file() [all …]
|
| /linux/tools/perf/util/ |
| A D | symbol-minimal.c | 42 } *nhdr; in read_build_id() local 50 nhdr = ptr; in read_build_id() 52 nhdr->n_namesz = bswap_32(nhdr->n_namesz); in read_build_id() 53 nhdr->n_descsz = bswap_32(nhdr->n_descsz); in read_build_id() 54 nhdr->n_type = bswap_32(nhdr->n_type); in read_build_id() 57 namesz = NOTE_ALIGN(nhdr->n_namesz); in read_build_id() 58 descsz = NOTE_ALIGN(nhdr->n_descsz); in read_build_id() 60 ptr += sizeof(*nhdr); in read_build_id() 63 if (nhdr->n_type == NT_GNU_BUILD_ID && in read_build_id() 64 nhdr->n_namesz == sizeof("GNU")) { in read_build_id()
|
| A D | symbol-elf.c | 911 GElf_Nhdr *nhdr = ptr; in elf_read_build_id() local 916 ptr += sizeof(*nhdr); in elf_read_build_id() 1043 GElf_Nhdr nhdr; in sysfs__read_build_id() local 1046 if (read(fd, &nhdr, sizeof(nhdr)) != sizeof(nhdr)) in sysfs__read_build_id() 1049 namesz = NOTE_ALIGN(nhdr.n_namesz); in sysfs__read_build_id() 1050 descsz = NOTE_ALIGN(nhdr.n_descsz); in sysfs__read_build_id() 1051 if (nhdr.n_type == NT_GNU_BUILD_ID && in sysfs__read_build_id() 1071 __func__, filename, nhdr.n_namesz, nhdr.n_descsz); in sysfs__read_build_id() 2865 GElf_Nhdr nhdr; in construct_sdt_notes_list() local 2899 if (nhdr.n_type != SDT_NOTE_TYPE) in construct_sdt_notes_list() [all …]
|
| /linux/tools/testing/selftests/bpf/ |
| A D | trace_helpers.c | 406 Elf32_Nhdr *nhdr = (Elf32_Nhdr *)(note_start + note_offs); in parse_build_id_buf() local 408 if (nhdr->n_type == 3 && nhdr->n_namesz == sizeof("GNU") && in parse_build_id_buf() 409 !strcmp((char *)(nhdr + 1), "GNU") && nhdr->n_descsz > 0 && in parse_build_id_buf() 410 nhdr->n_descsz <= BPF_BUILD_ID_SIZE) { in parse_build_id_buf() 412 ALIGN(sizeof("GNU"), 4) + sizeof(Elf32_Nhdr), nhdr->n_descsz); in parse_build_id_buf() 413 memset(build_id + nhdr->n_descsz, 0, BPF_BUILD_ID_SIZE - nhdr->n_descsz); in parse_build_id_buf() 414 return (int) nhdr->n_descsz; in parse_build_id_buf() 418 ALIGN(nhdr->n_namesz, 4) + ALIGN(nhdr->n_descsz, 4); in parse_build_id_buf()
|
| /linux/lib/ |
| A D | buildid.c | 169 const Elf32_Nhdr *nhdr; in parse_build_id() local 176 nhdr = freader_fetch(r, note_off, sizeof(Elf32_Nhdr) + note_name_sz); in parse_build_id() 177 if (!nhdr) in parse_build_id() 180 name_sz = READ_ONCE(nhdr->n_namesz); in parse_build_id() 181 desc_sz = READ_ONCE(nhdr->n_descsz); in parse_build_id() 189 if (nhdr->n_type == BUILD_ID && in parse_build_id() 191 memcmp(nhdr + 1, note_name, note_name_sz) == 0 && in parse_build_id()
|
| /linux/scripts/ |
| A D | recordmcount.h | 237 unsigned const nhdr, Elf32_Word **symtab, in find_symtab() argument 246 for (relhdr = shdr0, k = nhdr; k; --k, ++relhdr) { in find_symtab() 585 unsigned nhdr, in tot_relsize() argument 593 for (; nhdr; --nhdr, ++shdrp) { in tot_relsize() 611 unsigned const nhdr = get_shnum(ehdr, shdr0); in do_func() local 636 totrelsz = tot_relsize(shdr0, nhdr, shstrtab, fname); in do_func() 652 find_symtab(ehdr, shdr0, nhdr, &symtab, &symtab_shndx); in do_func() 654 for (relhdr = shdr0, k = nhdr; k; --k, ++relhdr) { in do_func()
|
| /linux/tools/lib/bpf/ |
| A D | usdt.c | 572 static int parse_usdt_note(Elf *elf, const char *path, GElf_Nhdr *nhdr, 589 GElf_Nhdr nhdr; in collect_usdt_targets() local 621 while ((off = gelf_getnote(data, off, &nhdr, &name_off, &desc_off)) > 0) { in collect_usdt_targets() 627 err = parse_usdt_note(elf, path, &nhdr, data->d_buf, name_off, desc_off, ¬e); in collect_usdt_targets() 1133 static int parse_usdt_note(Elf *elf, const char *path, GElf_Nhdr *nhdr, in parse_usdt_note() argument 1142 if (strncmp(data + name_off, USDT_NOTE_NAME, nhdr->n_namesz) != 0) in parse_usdt_note() 1144 if (nhdr->n_type != USDT_NOTE_TYPE) in parse_usdt_note() 1148 len = nhdr->n_descsz; in parse_usdt_note()
|
| /linux/fs/ |
| A D | binfmt_elf.c | 766 struct elf_note nhdr; in parse_elf_properties() member 790 BUILD_BUG_ON(sizeof(note) < sizeof(note.nhdr) + NOTE_NAME_SZ); in parse_elf_properties() 791 if (n < 0 || n < sizeof(note.nhdr) + NOTE_NAME_SZ) in parse_elf_properties() 794 if (note.nhdr.n_type != NT_GNU_PROPERTY_TYPE_0 || in parse_elf_properties() 795 note.nhdr.n_namesz != NOTE_NAME_SZ || in parse_elf_properties() 796 strncmp(note.data + sizeof(note.nhdr), in parse_elf_properties() 797 GNU_PROPERTY_TYPE_0_NAME, n - sizeof(note.nhdr))) in parse_elf_properties() 800 off = round_up(sizeof(note.nhdr) + NOTE_NAME_SZ, in parse_elf_properties() 805 if (note.nhdr.n_descsz > n - off) in parse_elf_properties() 807 datasz = off + note.nhdr.n_descsz; in parse_elf_properties()
|
| /linux/include/net/ |
| A D | ipv6.h | 479 const struct ipv6hdr *nhdr; in ipv6_has_hopopt_jumbo() local 492 nhdr = ipv6_hdr(skb); in ipv6_has_hopopt_jumbo() 494 if (nhdr->nexthdr != NEXTHDR_HOP) in ipv6_has_hopopt_jumbo() 497 jhdr = (const struct hop_jumbo_hdr *) (nhdr + 1); in ipv6_has_hopopt_jumbo()
|
| /linux/include/pcmcia/ |
| A D | cistpl.h | 504 u_char nhdr; member
|
| /linux/drivers/gpu/drm/amd/amdgpu/ |
| A D | amdgpu_discovery.c | 387 struct nps_info_header *nhdr = in amdgpu_discovery_verify_npsinfo() local 390 if (le32_to_cpu(nhdr->table_id) != NPS_INFO_TABLE_ID) { in amdgpu_discovery_verify_npsinfo() 396 le32_to_cpu(nhdr->size_bytes), in amdgpu_discovery_verify_npsinfo()
|
| /linux/drivers/pcmcia/ |
| A D | cistpl.c | 1241 v2->nhdr = p[8]; in parse_vers_2()
|