Home
last modified time | relevance | path

Searched refs:nhdr (Results 1 – 25 of 26) sorted by relevance

12

/external/elfutils/tests/
Dxlate_notes.c101 GElf_Nhdr nhdr; in main() local
104 while ((next = gelf_getnote (data, off, &nhdr, &n_off, &d_off)) > 0) in main()
130 nhdr.n_type, nh.n_type, in main()
131 nhdr.n_namesz, nh.n_namesz, in main()
132 nhdr.n_descsz, nh.n_descsz); in main()
134 if (nhdr.n_type != nh.n_type in main()
135 || nhdr.n_namesz != nh.n_namesz in main()
136 || nhdr.n_descsz != nh.n_descsz) in main()
/external/linux-kselftest/tools/testing/selftests/powerpc/ptrace/
Dcore-pkey.c188 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()
233 (void *) nhdr < p + phdr->p_offset + phdr->p_filesz; 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()
238 FAIL_IF((void *) nhdr >= p + phdr->p_offset + phdr->p_filesz); in check_core_file()
[all …]
/external/mesa3d/src/util/
Dbuild_id.c42 ElfW(Nhdr) nhdr;
83 if (note->nhdr.n_type == NT_GNU_BUILD_ID && in build_id_find_nhdr_callback()
84 note->nhdr.n_descsz != 0 && in build_id_find_nhdr_callback()
85 note->nhdr.n_namesz == 4 && in build_id_find_nhdr_callback()
92 ALIGN_POT(note->nhdr.n_namesz, 4) + in build_id_find_nhdr_callback()
93 ALIGN_POT(note->nhdr.n_descsz, 4); in build_id_find_nhdr_callback()
127 return note->nhdr.n_descsz; in build_id_length()
/external/elfutils/backends/
Dlinux-core-note.c213 EBLHOOK(core_note) (const GElf_Nhdr *nhdr, const char *name, in EBLHOOK()
218 switch (nhdr->n_namesz) in EBLHOOK()
221 if (memcmp (name, "CORE", nhdr->n_namesz) == 0) in EBLHOOK()
226 if (memcmp (name, "CORE", nhdr->n_namesz) == 0) in EBLHOOK()
232 if (memcmp (name, "LINUX", nhdr->n_namesz) == 0) in EBLHOOK()
237 if (nhdr->n_type != 0 in EBLHOOK()
250 switch (nhdr->n_type) in EBLHOOK()
253 if (nhdr->n_descsz != sizeof (struct EBLHOOK(prstatus))) in EBLHOOK()
263 if (nhdr->n_descsz != sizeof (struct EBLHOOK(prpsinfo))) in EBLHOOK()
274 if (nhdr->n_descsz != size) \ in EBLHOOK()
[all …]
Dx86_corenote.c31 return ioperm_info (nhdr->n_descsz, \
Di386_corenote.c109 return tls_info (nhdr->n_descsz, regs_offset, nregloc, reglocs, \
/external/elfutils/libdwfl/
Dlinux-core-attach.c104 GElf_Nhdr nhdr; in core_next_thread() local
128 &nhdr, &name_offset, in core_next_thread()
132 const char *name = (nhdr.n_namesz == 0 in core_next_thread()
140 if (! ebl_core_note (core_arg->ebl, &nhdr, name, desc, in core_next_thread()
146 if (nhdr.n_type != NT_PRSTATUS) in core_next_thread()
174 GElf_Nhdr nhdr; in core_set_initial_registers() local
181 size_t getnote_err = gelf_getnote (note_data, offset, &nhdr, &name_offset, in core_set_initial_registers()
187 const char *name = (nhdr.n_namesz == 0 in core_set_initial_registers()
195 int core_note_err = ebl_core_note (core_arg->ebl, &nhdr, name, desc, in core_set_initial_registers()
199 if (core_note_err == 0 || nhdr.n_type != NT_PRSTATUS) in core_set_initial_registers()
[all …]
Dlinux-kernel-modules.c584 GElf_Nhdr nhdr; in check_notes() member
599 GElf_Nhdr *nhdr = (void *) p; in check_notes() local
600 len += sizeof *nhdr; in check_notes()
607 if (nhdr->n_type == NT_GNU_PROPERTY_TYPE_0 in check_notes()
608 && nhdr->n_namesz == sizeof "GNU" in check_notes()
609 && name + nhdr->n_namesz < &buf.data[n] in check_notes()
612 len += nhdr->n_namesz; in check_notes()
616 len += nhdr->n_descsz; in check_notes()
622 len += nhdr->n_namesz; in check_notes()
626 len += nhdr->n_descsz; in check_notes()
[all …]
Dcore-file.c520 GElf_Nhdr nhdr; in dwfl_core_file_report() local
523 while ((pos = gelf_getnote (notes, pos, &nhdr, in dwfl_core_file_report()
525 if (nhdr.n_namesz == sizeof "CORE" in dwfl_core_file_report()
528 if (nhdr.n_type == NT_AUXV) in dwfl_core_file_report()
531 auxv_size = nhdr.n_descsz; in dwfl_core_file_report()
533 if (nhdr.n_type == NT_FILE) in dwfl_core_file_report()
536 note_file_size = nhdr.n_descsz; in dwfl_core_file_report()
/external/elfutils/libebl/
Deblcorenote.c44 ebl_core_note (Ebl *ebl, const GElf_Nhdr *nhdr, const char *name, in ebl_core_note() argument
50 int result = ebl->core_note (nhdr, name, in ebl_core_note()
66 if (nhdr->n_type == NT_PLATFORM in ebl_core_note()
67 && memchr (desc, '\0', nhdr->n_descsz) != NULL) in ebl_core_note()
Dlibebl.h310 extern int ebl_core_note (Ebl *ebl, const GElf_Nhdr *nhdr,
Deblopenbackend.c188 static int default_core_note (const GElf_Nhdr *nhdr, const char *name,
539 default_core_note (const GElf_Nhdr *nhdr __attribute__ ((unused)), in default_core_note() argument
/external/tcpdump/
Dprint-pktap.c107 struct pcap_pkthdr nhdr; in pktap_if_print() local
148 nhdr = *h; in pktap_if_print()
149 nhdr.caplen = caplen; in pktap_if_print()
150 nhdr.len = length; in pktap_if_print()
151 hdrlen += printer(ndo, &nhdr, p); in pktap_if_print()
Dprint-ppi.c63 struct pcap_pkthdr nhdr; in ppi_print() local
94 nhdr = *h; in ppi_print()
95 nhdr.caplen = caplen; in ppi_print()
96 nhdr.len = length; in ppi_print()
97 hdrlen = printer(ndo, &nhdr, p); in ppi_print()
Dprint-esp.c639 int *nhdr in esp_print()
816 if (nhdr) in esp_print()
817 *nhdr = *(ep - 1); in esp_print()
/external/elfutils/libdwelf/
Ddwelf_elf_gnu_build_id.c44 GElf_Nhdr nhdr; in check_notes() local
47 while ((pos = gelf_getnote (data, pos, &nhdr, &name_pos, &desc_pos)) > 0) in check_notes()
48 if (nhdr.n_type == NT_GNU_BUILD_ID in check_notes()
49 && nhdr.n_namesz == sizeof "GNU" in check_notes()
55 *build_id_len = nhdr.n_descsz; in check_notes()
/external/llvm-project/compiler-rt/lib/hwasan/
Dhwasan_globals.cpp63 auto *nhdr = reinterpret_cast<const ElfW(Nhdr) *>(note); in HwasanGlobalsFor() local
65 const char *desc = name + RoundUpTo(nhdr->n_namesz, 4); in HwasanGlobalsFor()
68 if (nhdr->n_type != NT_LLVM_HWASAN_GLOBALS || in HwasanGlobalsFor()
70 note = desc + RoundUpTo(nhdr->n_descsz, 4); in HwasanGlobalsFor()
/external/perfetto/src/profiling/symbolizer/
Dlocal_symbolizer.cc302 typename E::Nhdr* nhdr = in GetBuildId() local
305 if (!InRange(mem, size, nhdr, sizeof(typename E::Nhdr))) { in GetBuildId()
309 if (nhdr->n_type == NT_GNU_BUILD_ID && nhdr->n_namesz == 4) { in GetBuildId()
310 char* name = reinterpret_cast<char*>(nhdr) + sizeof(*nhdr); in GetBuildId()
316 const char* value = reinterpret_cast<char*>(nhdr) + sizeof(*nhdr) + in GetBuildId()
317 base::AlignUp<4>(nhdr->n_namesz); in GetBuildId()
319 if (!InRange(mem, size, value, nhdr->n_descsz)) { in GetBuildId()
323 return std::string(value, nhdr->n_descsz); in GetBuildId()
326 offset += sizeof(*nhdr) + base::AlignUp<4>(nhdr->n_namesz) + in GetBuildId()
327 base::AlignUp<4>(nhdr->n_descsz); in GetBuildId()
/external/google-breakpad/src/tools/linux/md2core/
Dminidump-2-core.cc935 Nhdr nhdr; in WriteThread() local
936 memset(&nhdr, 0, sizeof(nhdr)); in WriteThread()
937 nhdr.n_namesz = 5; in WriteThread()
938 nhdr.n_descsz = sizeof(struct prstatus); in WriteThread()
939 nhdr.n_type = NT_PRSTATUS; in WriteThread()
940 if (!writea(options.out_fd, &nhdr, sizeof(nhdr)) || in WriteThread()
947 nhdr.n_descsz = sizeof(user_fpregs_struct); in WriteThread()
948 nhdr.n_type = NT_FPREGSET; in WriteThread()
949 if (!writea(options.out_fd, &nhdr, sizeof(nhdr)) || in WriteThread()
957 nhdr.n_descsz = sizeof(user_fpxregs_struct); in WriteThread()
[all …]
/external/libnl/lib/route/
Dneigh.c693 struct ndmsg nhdr = { in build_neigh_msg() local
701 nhdr.ndm_family = nl_addr_get_family(tmpl->n_dst); in build_neigh_msg()
704 nhdr.ndm_family = AF_BRIDGE; in build_neigh_msg()
707 nhdr.ndm_flags = tmpl->n_flags; in build_neigh_msg()
710 nhdr.ndm_state = tmpl->n_state; in build_neigh_msg()
716 if (nlmsg_append(msg, &nhdr, sizeof(nhdr), NLMSG_ALIGNTO) < 0) in build_neigh_msg()
/external/wpa_supplicant_8/src/eap_peer/
Deap_peap.c829 struct eap_hdr *nhdr; in eap_peap_decrypt() local
836 nhdr = wpabuf_put(nmsg, sizeof(*nhdr)); in eap_peap_decrypt()
838 nhdr->code = req->code; in eap_peap_decrypt()
839 nhdr->identifier = req->identifier; in eap_peap_decrypt()
840 nhdr->length = host_to_be16(sizeof(struct eap_hdr) + in eap_peap_decrypt()
/external/wpa_supplicant_8/src/eap_server/
Deap_server_peap.c1125 struct eap_hdr *nhdr; in eap_peap_process_phase2() local
1135 nhdr = wpabuf_put(nbuf, sizeof(*nhdr)); in eap_peap_process_phase2()
1136 nhdr->code = resp->code; in eap_peap_process_phase2()
1137 nhdr->identifier = resp->identifier; in eap_peap_process_phase2()
1138 nhdr->length = host_to_be16(sizeof(struct eap_hdr) + in eap_peap_process_phase2()
/external/llvm-project/lld/ELF/
DInputFiles.cpp808 auto *nhdr = reinterpret_cast<const Elf_Nhdr *>(data.data()); in readAndFeatures() local
809 if (data.size() < sizeof(Elf_Nhdr) || data.size() < nhdr->getSize()) in readAndFeatures()
812 Elf_Note note(*nhdr); in readAndFeatures()
813 if (nhdr->n_type != NT_GNU_PROPERTY_TYPE_0 || note.getName() != "GNU") { in readAndFeatures()
814 data = data.slice(nhdr->getSize()); in readAndFeatures()
848 data = data.slice(nhdr->getSize()); in readAndFeatures()
/external/elfutils/src/
Delflint.c4309 GElf_Nhdr nhdr; in check_note_data() local
4314 &nhdr, &name_offset, &desc_offset)) > 0) in check_note_data()
4320 switch (nhdr.n_type) in check_note_data()
4344 phndx, (uint32_t) nhdr.n_type, start + offset); in check_note_data()
4350 (uint32_t) nhdr.n_type, offset); in check_note_data()
4353 switch (nhdr.n_type) in check_note_data()
4360 if (nhdr.n_namesz == sizeof ELF_NOTE_GNU in check_note_data()
4367 if (nhdr.n_descsz == 0 && nhdr.n_type == NT_VERSION) in check_note_data()
4377 if (nhdr.n_namesz >= sizeof ELF_NOTE_GNU_BUILD_ATTRIBUTE_PREFIX in check_note_data()
4387 if (nhdr.n_namesz == sizeof "Linux" in check_note_data()
[all …]
Dreadelf.c12394 handle_core_note (Ebl *ebl, const GElf_Nhdr *nhdr, in handle_core_note() argument
12403 if (! ebl_core_note (ebl, nhdr, name, desc, in handle_core_note()
12412 nregloc == 0 ? nhdr->n_descsz : 0, in handle_core_note()
12433 GElf_Nhdr nhdr; in handle_notes_data() local
12438 &nhdr, &name_offset, &desc_offset)) > 0) in handle_notes_data()
12440 const char *name = nhdr.n_namesz == 0 ? "" : data->d_buf + name_offset; in handle_notes_data()
12452 ? strlen (print_name) : nhdr.n_namesz); in handle_notes_data()
12457 (int) print_namesz, print_name, nhdr.n_descsz, in handle_notes_data()
12459 ? ebl_core_note_type_name (ebl, nhdr.n_type, in handle_notes_data()
12461 : ebl_object_note_type_name (ebl, name, nhdr.n_type, in handle_notes_data()
[all …]

12