/third_party/lwip/src/include/lwip/prot/ |
D | tcp.h | 85 #define TCPH_HDRLEN(phdr) ((u16_t)(lwip_ntohs((phdr)->_hdrlen_rsvd_flags) >> 12)) argument 86 #define TCPH_HDRLEN_BYTES(phdr) ((u8_t)(TCPH_HDRLEN(phdr) << 2)) argument 87 #define TCPH_FLAGS(phdr) ((u8_t)((lwip_ntohs((phdr)->_hdrlen_rsvd_flags) & TCP_FLAGS))) argument 89 #define TCPH_HDRLEN_SET(phdr, len) (phdr)->_hdrlen_rsvd_flags = lwip_htons(((len) << 12) | TCPH_FLA… argument 90 #define TCPH_FLAGS_SET(phdr, flags) (phdr)->_hdrlen_rsvd_flags = (((phdr)->_hdrlen_rsvd_flags & PP_… argument 91 #define TCPH_HDRLEN_FLAGS_SET(phdr, len, flags) (phdr)->_hdrlen_rsvd_flags = (u16_t)(lwip_htons((u1… argument 93 #define TCPH_SET_FLAG(phdr, flags ) (phdr)->_hdrlen_rsvd_flags = ((phdr)->_hdrlen_rsvd_flags | lwip… argument 94 #define TCPH_UNSET_FLAG(phdr, flags) (phdr)->_hdrlen_rsvd_flags = ((phdr)->_hdrlen_rsvd_flags & ~lw… argument
|
/third_party/libunwind/src/coredump/ |
D | _UCD_elf_map_image.c | 34 CD_elf_map_image(struct UCD_info *ui, coredump_phdr_t *phdr) in CD_elf_map_image() argument 38 if (phdr->backing_fd < 0) in CD_elf_map_image() 45 … ei->image = mmap(NULL, phdr->p_memsz, PROT_READ, MAP_PRIVATE, ui->coredump_fd, phdr->p_offset); in CD_elf_map_image() 51 ei->size = phdr->p_filesz; in CD_elf_map_image() 52 size_t remainder_len = phdr->p_memsz - phdr->p_filesz; in CD_elf_map_image() 55 void *remainder_base = (char*) ei->image + phdr->p_filesz; in CD_elf_map_image() 67 ei->image = mmap(NULL, phdr->backing_filesize, PROT_READ, MAP_PRIVATE, phdr->backing_fd, 0); in CD_elf_map_image() 73 ei->size = phdr->backing_filesize; in CD_elf_map_image() 85 return phdr; in CD_elf_map_image() 94 coredump_phdr_t *phdr = &ui->phdrs[i]; in _UCD_get_elf_image() local [all …]
|
D | _UCD_access_mem.c | 40 coredump_phdr_t *phdr; in _UCD_access_mem() local 44 phdr = &ui->phdrs[i]; in _UCD_access_mem() 45 if (phdr->p_vaddr <= addr && addr_last < phdr->p_vaddr + phdr->p_memsz) in _UCD_access_mem() 58 if (addr_last >= phdr->p_vaddr + phdr->p_filesz) in _UCD_access_mem() 62 if (phdr->backing_fd < 0) in _UCD_access_mem() 69 filename = phdr->backing_filename; in _UCD_access_mem() 70 fileofs = addr - phdr->p_vaddr; in _UCD_access_mem() 71 fd = phdr->backing_fd; in _UCD_access_mem() 76 fileofs = phdr->p_offset + (addr - phdr->p_vaddr); in _UCD_access_mem()
|
D | _UCD_create.c | 259 struct coredump_phdr *phdr = &ui->phdrs[phdr_no]; in _UCD_add_backing_file_at_segment() local 260 if (phdr->backing_filename) in _UCD_add_backing_file_at_segment() 273 phdr->backing_fd = fd; in _UCD_add_backing_file_at_segment() 274 phdr->backing_filename = strdup(filename); in _UCD_add_backing_file_at_segment() 282 phdr->backing_filesize = (uoff_t)statbuf.st_size; in _UCD_add_backing_file_at_segment() 284 if (phdr->p_flags != (PF_X | PF_R)) in _UCD_add_backing_file_at_segment() 287 phdr_no, phdr->p_flags); in _UCD_add_backing_file_at_segment() 290 if (phdr->backing_filesize > phdr->p_memsz) in _UCD_add_backing_file_at_segment() 295 (unsigned long long)phdr->p_memsz, in _UCD_add_backing_file_at_segment() 296 (unsigned long long)phdr->backing_filesize in _UCD_add_backing_file_at_segment() [all …]
|
/third_party/elfutils/libelf/ |
D | elf32_getphdr.c | 54 result = elf->state.ELFW(elf,LIBELFBITS).phdr; in ElfW2() 113 elf->state.ELFW(elf,LIBELFBITS).phdr = file_phdr; in ElfW2() 117 ElfW2(LIBELFBITS,Phdr) *phdr; in ElfW2() 121 phdr = elf->state.ELFW(elf,LIBELFBITS).phdr = in ElfW2() 123 if (elf->state.ELFW(elf,LIBELFBITS).phdr == NULL) in ElfW2() 137 memcpy (phdr, file_phdr, size); in ElfW2() 160 CONVERT_TO (phdr[cnt].p_type, notcvt[cnt].p_type); in ElfW2() 161 CONVERT_TO (phdr[cnt].p_offset, notcvt[cnt].p_offset); in ElfW2() 162 CONVERT_TO (phdr[cnt].p_vaddr, notcvt[cnt].p_vaddr); in ElfW2() 163 CONVERT_TO (phdr[cnt].p_paddr, notcvt[cnt].p_paddr); in ElfW2() [all …]
|
D | gelf_getphdr.c | 66 Elf32_Phdr *phdr = elf->state.elf32.phdr; in gelf_getphdr() local 68 if (phdr == NULL) in gelf_getphdr() 71 phdr = INTUSE(elf32_getphdr) (elf); in gelf_getphdr() 72 if (phdr == NULL) in gelf_getphdr() 91 phdr += ndx; in gelf_getphdr() 93 #define COPY(Name) result->Name = phdr->Name in gelf_getphdr() 106 Elf64_Phdr *phdr = elf->state.elf64.phdr; in gelf_getphdr() local 108 if (phdr == NULL) in gelf_getphdr() 111 phdr = INTUSE(elf64_getphdr) (elf); in gelf_getphdr() 112 if (phdr == NULL) in gelf_getphdr() [all …]
|
D | gelf_update_phdr.c | 58 Elf32_Phdr *phdr = elf->state.elf32.phdr; in gelf_update_phdr() local 74 if (phdr == NULL) in gelf_update_phdr() 76 phdr = __elf32_getphdr_wrlock (elf); in gelf_update_phdr() 77 if (phdr == NULL) in gelf_update_phdr() 94 phdr += ndx; in gelf_update_phdr() 97 phdr->name = src->name in gelf_update_phdr() 109 Elf64_Phdr *phdr = elf->state.elf64.phdr; in gelf_update_phdr() local 111 if (phdr == NULL) in gelf_update_phdr() 113 phdr = __elf64_getphdr_wrlock (elf); in gelf_update_phdr() 114 if (phdr == NULL) in gelf_update_phdr() [all …]
|
/third_party/elfutils/tests/ |
D | vendorelf.c | 89 GElf_Phdr phdr; in check_elf() local 90 if (gelf_getphdr (elf, 0, &phdr) == NULL) in check_elf() 97 phdr.p_type = PT_NULL; in check_elf() 98 phdr.p_offset = 0; in check_elf() 99 phdr.p_vaddr = 0; in check_elf() 100 phdr.p_paddr = 1; in check_elf() 101 phdr.p_filesz = 0; in check_elf() 102 phdr.p_memsz = 1024; in check_elf() 103 phdr.p_flags = PF_R; in check_elf() 104 phdr.p_align = 16; in check_elf() [all …]
|
D | showptable.c | 89 GElf_Phdr *phdr = gelf_getphdr (elf, cnt, &mem); in main() local 91 const char *p_type = typenames[phdr->p_type]; in main() 94 if (phdr->p_type >= PT_NUM) in main() 96 snprintf (buf, sizeof (buf), "%x", phdr->p_type); in main() 103 (unsigned long long int) phdr->p_offset, in main() 105 (unsigned long long int) phdr->p_vaddr, in main() 107 (unsigned long long int) phdr->p_paddr, in main() 109 (unsigned long long int) phdr->p_filesz, in main() 111 (unsigned long long int) phdr->p_memsz, in main() 112 (unsigned long long int) phdr->p_align); in main() [all …]
|
D | alldts.c | 111 Elf32_Phdr *phdr = elf32_newphdr (elf, 2); in main() local 112 if (phdr == NULL) in main() 118 phdr[0].p_type = PT_PHDR; in main() 119 phdr[1].p_type = PT_DYNAMIC; in main() 230 phdr[0].p_offset = ehdr->e_phoff; in main() 231 phdr[0].p_vaddr = ehdr->e_phoff; in main() 232 phdr[0].p_paddr = ehdr->e_phoff; in main() 233 phdr[0].p_flags = PF_R | PF_X; in main() 234 phdr[0].p_filesz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT); in main() 235 phdr[0].p_memsz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT); in main() [all …]
|
D | update2.c | 40 Elf32_Phdr *phdr; in main() local 92 phdr = elf32_newphdr (elf, 1); in main() 93 if (phdr == NULL) in main() 99 phdr[0].p_type = PT_PHDR; in main() 111 phdr[0].p_offset = ehdr->e_phoff; in main() 112 phdr[0].p_offset = ehdr->e_phoff; in main() 113 phdr[0].p_vaddr = ehdr->e_phoff; in main() 114 phdr[0].p_paddr = ehdr->e_phoff; in main() 115 phdr[0].p_flags = PF_R | PF_X; in main() 116 phdr[0].p_filesz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT); in main() [all …]
|
D | update3.c | 42 Elf32_Phdr *phdr; in main() local 101 phdr = elf32_newphdr (elf, 1); in main() 102 if (phdr == NULL) in main() 108 phdr[0].p_type = PT_PHDR; in main() 160 phdr[0].p_offset = ehdr->e_phoff; in main() 161 phdr[0].p_offset = ehdr->e_phoff; in main() 162 phdr[0].p_vaddr = ehdr->e_phoff; in main() 163 phdr[0].p_paddr = ehdr->e_phoff; in main() 164 phdr[0].p_flags = PF_R | PF_X; in main() 165 phdr[0].p_filesz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT); in main() [all …]
|
/third_party/libunwind/src/dwarf/ |
D | Gfind_unwind_table.c | 57 Elf_W(Phdr) *phdr, *ptxt = NULL, *peh_hdr = NULL, *pdyn = NULL; in dwarf_find_unwind_table() 90 phdr = (Elf_W(Phdr) *) ((char *) ei->image + ehdr->e_phoff); in dwarf_find_unwind_table() 91 if (((unw_word_t)phdr) + sizeof(Elf_W(Phdr)) > max_load_addr || in dwarf_find_unwind_table() 92 ((unw_word_t)phdr) + sizeof(Elf_W(Phdr)) < min_load_addr) { in dwarf_find_unwind_table() 104 if (((unw_word_t)(&(phdr[i])) + sizeof(Elf_W(Phdr))) > max_load_addr || in dwarf_find_unwind_table() 105 ((unw_word_t)(&(phdr[i])) + sizeof(Elf_W(Phdr))) < min_load_addr) { in dwarf_find_unwind_table() 109 switch (phdr[i].p_type) in dwarf_find_unwind_table() 112 if ((phdr[i].p_flags & PF_X) == 0) { in dwarf_find_unwind_table() 117 ei->load_bias = phdr[i].p_vaddr - phdr[i].p_offset; in dwarf_find_unwind_table() 121 if (phdr[i].p_vaddr < start_ip) in dwarf_find_unwind_table() [all …]
|
/third_party/musl/src/ldso/ |
D | dl_iterate_phdr.c | 13 ElfW(Phdr) *phdr, *tls_phdr=0; in static_dl_iterate_phdr() 23 phdr = (void *)p; in static_dl_iterate_phdr() 24 if (phdr->p_type == PT_PHDR) in static_dl_iterate_phdr() 25 base = aux[AT_PHDR] - phdr->p_vaddr; in static_dl_iterate_phdr() 26 if (phdr->p_type == PT_DYNAMIC && _DYNAMIC) in static_dl_iterate_phdr() 27 base = (size_t)_DYNAMIC - phdr->p_vaddr; in static_dl_iterate_phdr() 28 if (phdr->p_type == PT_TLS) in static_dl_iterate_phdr() 29 tls_phdr = phdr; in static_dl_iterate_phdr()
|
/third_party/musl/porting/linux/user/src/env/ |
D | __init_tls.c | 91 Phdr *phdr, *tls_phdr=0; in static_init_tls() local 96 phdr = (void *)p; in static_init_tls() 97 if (phdr->p_type == PT_PHDR) in static_init_tls() 98 base = aux[AT_PHDR] - phdr->p_vaddr; in static_init_tls() 99 if (phdr->p_type == PT_DYNAMIC && _DYNAMIC) in static_init_tls() 100 base = (size_t)_DYNAMIC - phdr->p_vaddr; in static_init_tls() 101 if (phdr->p_type == PT_TLS) in static_init_tls() 102 tls_phdr = phdr; in static_init_tls() 103 if (phdr->p_type == PT_GNU_STACK && in static_init_tls() 104 phdr->p_memsz > __default_stacksize) in static_init_tls() [all …]
|
/third_party/musl/src/env/ |
D | __init_tls.c | 86 Phdr *phdr, *tls_phdr=0; in static_init_tls() local 91 phdr = (void *)p; in static_init_tls() 92 if (phdr->p_type == PT_PHDR) in static_init_tls() 93 base = aux[AT_PHDR] - phdr->p_vaddr; in static_init_tls() 94 if (phdr->p_type == PT_DYNAMIC && _DYNAMIC) in static_init_tls() 95 base = (size_t)_DYNAMIC - phdr->p_vaddr; in static_init_tls() 96 if (phdr->p_type == PT_TLS) in static_init_tls() 97 tls_phdr = phdr; in static_init_tls() 98 if (phdr->p_type == PT_GNU_STACK && in static_init_tls() 99 phdr->p_memsz > __default_stacksize) in static_init_tls() [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_peer/ |
D | ikev2.c | 844 struct ikev2_payload_hdr *phdr; in ikev2_build_sar1() local 852 phdr = wpabuf_put(msg, sizeof(*phdr)); in ikev2_build_sar1() 853 phdr->next_payload = next_payload; in ikev2_build_sar1() 854 phdr->flags = 0; in ikev2_build_sar1() 893 plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) phdr; in ikev2_build_sar1() 894 WPA_PUT_BE16(phdr->payload_length, plen); in ikev2_build_sar1() 903 struct ikev2_payload_hdr *phdr; in ikev2_build_ker() local 916 phdr = wpabuf_put(msg, sizeof(*phdr)); in ikev2_build_ker() 917 phdr->next_payload = next_payload; in ikev2_build_ker() 918 phdr->flags = 0; in ikev2_build_ker() [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_peer/ |
D | ikev2.c | 842 struct ikev2_payload_hdr *phdr; in ikev2_build_sar1() local 850 phdr = wpabuf_put(msg, sizeof(*phdr)); in ikev2_build_sar1() 851 phdr->next_payload = next_payload; in ikev2_build_sar1() 852 phdr->flags = 0; in ikev2_build_sar1() 891 plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) phdr; in ikev2_build_sar1() 892 WPA_PUT_BE16(phdr->payload_length, plen); in ikev2_build_sar1() 901 struct ikev2_payload_hdr *phdr; in ikev2_build_ker() local 914 phdr = wpabuf_put(msg, sizeof(*phdr)); in ikev2_build_ker() 915 phdr->next_payload = next_payload; in ikev2_build_ker() 916 phdr->flags = 0; in ikev2_build_ker() [all …]
|
/third_party/rust/crates/rustix/src/backend/linux_raw/ |
D | vdso.rs | 93 let phdr = &*pt.add(i as usize); in init_from_sysinfo_ehdr() localVariable 94 if phdr.p_flags & PF_W != 0 { in init_from_sysinfo_ehdr() 99 if phdr.p_type == PT_LOAD && !found_vaddr { in init_from_sysinfo_ehdr() 102 if phdr.p_flags & (PF_R | PF_X) != (PF_R | PF_X) { in init_from_sysinfo_ehdr() 106 vdso.load_end = vdso.base_plus(phdr.p_offset.checked_add(phdr.p_memsz)?)?; in init_from_sysinfo_ehdr() 107 vdso.pv_offset = phdr.p_offset.wrapping_sub(phdr.p_vaddr); in init_from_sysinfo_ehdr() 108 } else if phdr.p_type == PT_DYNAMIC { in init_from_sysinfo_ehdr() 112 if phdr.p_offset < size_of::<Elf_Ehdr>() { in init_from_sysinfo_ehdr() 116 dyn_ = check_raw_pointer::<Elf_Dyn>(vdso.base_plus(phdr.p_offset)? as *mut _)? in init_from_sysinfo_ehdr() 118 num_dyn = phdr.p_memsz / size_of::<Elf_Dyn>(); in init_from_sysinfo_ehdr() [all …]
|
/third_party/musl/porting/liteos_a/user/src/env/ |
D | __init_tls.c | 118 Phdr *phdr, *tls_phdr=0; in static_init_tls() local 123 phdr = (void *)p; in static_init_tls() 124 if (phdr->p_type == PT_PHDR) in static_init_tls() 125 base = aux[AT_PHDR] - phdr->p_vaddr; in static_init_tls() 126 if (phdr->p_type == PT_DYNAMIC && _DYNAMIC) in static_init_tls() 127 base = (size_t)_DYNAMIC - phdr->p_vaddr; in static_init_tls() 128 if (phdr->p_type == PT_TLS) in static_init_tls() 129 tls_phdr = phdr; in static_init_tls() 130 if (phdr->p_type == PT_GNU_STACK && in static_init_tls() 131 phdr->p_memsz > __default_stacksize) in static_init_tls() [all …]
|
/third_party/elfutils/libdw/ |
D | dwarf_getcfi_elf.c | 128 getcfi_gnu_eh_frame (Elf *elf, const GElf_Ehdr *ehdr, const GElf_Phdr *phdr) in getcfi_gnu_eh_frame() argument 130 Elf_Data *data = elf_getdata_rawchunk (elf, phdr->p_offset, phdr->p_filesz, in getcfi_gnu_eh_frame() 144 const uint8_t *search_table = parse_eh_frame_hdr (data->d_buf, phdr->p_filesz, in getcfi_gnu_eh_frame() 145 phdr->p_vaddr, ehdr, in getcfi_gnu_eh_frame() 154 dmax = phdr->p_filesz - (search_table - (const uint8_t *) data->d_buf); in getcfi_gnu_eh_frame() 160 Dwarf_Off eh_frame_offset = eh_frame_ptr - phdr->p_vaddr + phdr->p_offset; in getcfi_gnu_eh_frame() 185 cfi->search_table_len = phdr->p_filesz; in getcfi_gnu_eh_frame() 186 cfi->search_table_vaddr = phdr->p_vaddr; in getcfi_gnu_eh_frame() 205 GElf_Phdr *phdr = gelf_getphdr (elf, i, &phdr_mem); in getcfi_phdr() local 206 if (unlikely (phdr == NULL)) in getcfi_phdr() [all …]
|
/third_party/musl/src/ldso/arm/ |
D | find_exidx.c | 13 const ElfW(Phdr) *phdr = info->dlpi_phdr; in find_exidx() 17 for (i = info->dlpi_phnum; i > 0; i--, phdr++) { in find_exidx() 18 addr = info->dlpi_addr + phdr->p_vaddr; in find_exidx() 19 switch (phdr->p_type) { in find_exidx() 21 match |= data->pc >= addr && data->pc < addr + phdr->p_memsz; in find_exidx() 25 exidx_len = phdr->p_memsz; in find_exidx()
|
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/eap_server/ |
D | ikev2.c | 906 struct ikev2_payload_hdr *phdr; in ikev2_build_sai() local 914 phdr = wpabuf_put(msg, sizeof(*phdr)); in ikev2_build_sai() 915 phdr->next_payload = next_payload; in ikev2_build_sai() 916 phdr->flags = 0; in ikev2_build_sai() 956 plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) phdr; in ikev2_build_sai() 957 WPA_PUT_BE16(phdr->payload_length, plen); in ikev2_build_sai() 966 struct ikev2_payload_hdr *phdr; in ikev2_build_kei() local 980 phdr = wpabuf_put(msg, sizeof(*phdr)); in ikev2_build_kei() 981 phdr->next_payload = next_payload; in ikev2_build_kei() 982 phdr->flags = 0; in ikev2_build_kei() [all …]
|
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/eap_server/ |
D | ikev2.c | 906 struct ikev2_payload_hdr *phdr; in ikev2_build_sai() local 914 phdr = wpabuf_put(msg, sizeof(*phdr)); in ikev2_build_sai() 915 phdr->next_payload = next_payload; in ikev2_build_sai() 916 phdr->flags = 0; in ikev2_build_sai() 956 plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) phdr; in ikev2_build_sai() 957 WPA_PUT_BE16(phdr->payload_length, plen); in ikev2_build_sai() 966 struct ikev2_payload_hdr *phdr; in ikev2_build_kei() local 980 phdr = wpabuf_put(msg, sizeof(*phdr)); in ikev2_build_kei() 981 phdr->next_payload = next_payload; in ikev2_build_kei() 982 phdr->flags = 0; in ikev2_build_kei() [all …]
|
/third_party/elfutils/libdwfl/ |
D | core-file.c | 139 GElf_Phdr *phdr = gelf_getphdr (elf, ndx, &phdr_mem); in dwfl_report_core_segments() local 140 if (unlikely (phdr == NULL)) in dwfl_report_core_segments() 145 switch (phdr->p_type) in dwfl_report_core_segments() 148 result = dwfl_report_segment (dwfl, ndx, phdr, 0, NULL); in dwfl_report_core_segments() 154 *notes = *phdr; in dwfl_report_core_segments() 280 #define more(size) do_more (size, &phdr, align, elf, start, &ndx, &end, &end_vaddr) 302 GElf_Phdr phdr; in dwfl_elf_phdr_memory_callback() local 305 if (unlikely (gelf_getphdr (elf, ndx++, &phdr) == NULL)) in dwfl_elf_phdr_memory_callback() 307 while (phdr.p_type != PT_LOAD in dwfl_elf_phdr_memory_callback() 308 || ((phdr.p_vaddr + phdr.p_memsz + align - 1) & -align) <= vaddr); in dwfl_elf_phdr_memory_callback() [all …]
|