/external/chromium_org/third_party/android_crazy_linker/src/src/ |
D | linker_phdr.cpp | 150 const ELF::Phdr* phdr = &phdr_table[i]; in phdr_table_get_load_size() local 152 if (phdr->p_type != PT_LOAD) { in phdr_table_get_load_size() 157 if (phdr->p_vaddr < min_vaddr) { in phdr_table_get_load_size() 158 min_vaddr = phdr->p_vaddr; in phdr_table_get_load_size() 161 if (phdr->p_vaddr + phdr->p_memsz > max_vaddr) { in phdr_table_get_load_size() 162 max_vaddr = phdr->p_vaddr + phdr->p_memsz; in phdr_table_get_load_size() 189 const ELF::Phdr* phdr = phdr_table; in _phdr_table_set_load_prot() local 190 const ELF::Phdr* phdr_limit = phdr + phdr_count; in _phdr_table_set_load_prot() 192 for (; phdr < phdr_limit; phdr++) { in _phdr_table_set_load_prot() 193 if (phdr->p_type != PT_LOAD || (phdr->p_flags & PF_W) != 0) in _phdr_table_set_load_prot() [all …]
|
D | crazy_linker_elf_loader.cpp | 228 for (const ELF::Phdr* phdr = phdr_table_; phdr < phdr_limit; ++phdr) { in FindPhdr() local 229 if (phdr->p_type == PT_PHDR) { in FindPhdr() 230 return CheckPhdr(load_bias_ + phdr->p_vaddr, error); in FindPhdr() 237 for (const ELF::Phdr* phdr = phdr_table_; phdr < phdr_limit; ++phdr) { in FindPhdr() local 238 if (phdr->p_type == PT_LOAD) { in FindPhdr() 239 if (phdr->p_offset == 0) { in FindPhdr() 240 ELF::Addr elf_addr = load_bias_ + phdr->p_vaddr; in FindPhdr() 259 for (ELF::Phdr* phdr = phdr_table_; phdr < phdr_limit; ++phdr) { in CheckPhdr() local 260 if (phdr->p_type != PT_LOAD) { in CheckPhdr() 263 ELF::Addr seg_start = phdr->p_vaddr + load_bias_; in CheckPhdr() [all …]
|
D | crazy_linker_elf_view.cpp | 16 const ELF::Phdr* phdr, in InitUnmapped() argument 21 load_size_ = phdr_table_get_load_size(phdr, phdr_count, &min_vaddr, NULL); in InitUnmapped() 30 phdr_table_get_dynamic_section(phdr, in InitUnmapped() 48 const ELF::Phdr* entry = &phdr[n]; in InitUnmapped() 60 const ELF::Phdr* entry = &phdr[n]; in InitUnmapped() 80 size_t seg_start = load_bias_ + phdr[n].p_vaddr; in InitUnmapped() 81 size_t seg_end = seg_start + phdr[n].p_filesz; in InitUnmapped()
|
/external/libunwind/src/coredump/ |
D | _UCD_elf_map_image.c | 30 CD_elf_map_image(struct UCD_info *ui, coredump_phdr_t *phdr) in CD_elf_map_image() argument 34 if (phdr->backing_fd < 0) in CD_elf_map_image() 41 … ei->image = mmap(NULL, phdr->p_memsz, PROT_READ, MAP_PRIVATE, ui->coredump_fd, phdr->p_offset); in CD_elf_map_image() 47 ei->size = phdr->p_filesz; in CD_elf_map_image() 48 size_t remainder_len = phdr->p_memsz - phdr->p_filesz; in CD_elf_map_image() 51 void *remainder_base = (char*) ei->image + phdr->p_filesz; in CD_elf_map_image() 63 ei->image = mmap(NULL, phdr->backing_filesize, PROT_READ, MAP_PRIVATE, phdr->backing_fd, 0); in CD_elf_map_image() 69 ei->size = phdr->backing_filesize; in CD_elf_map_image() 81 return phdr; in CD_elf_map_image() 90 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 | 315 struct coredump_phdr *phdr = &ui->phdrs[phdr_no]; in _UCD_add_backing_file_at_segment() local 316 if (phdr->backing_filename) in _UCD_add_backing_file_at_segment() 329 phdr->backing_fd = fd; in _UCD_add_backing_file_at_segment() 330 phdr->backing_filename = strdup(filename); in _UCD_add_backing_file_at_segment() 338 phdr->backing_filesize = (uoff_t)statbuf.st_size; in _UCD_add_backing_file_at_segment() 340 if (phdr->p_flags != (PF_X | PF_R)) in _UCD_add_backing_file_at_segment() 341 Debug(1, "Note: phdr[%u] is not r-x: flags are 0x%x\n", phdr_no, phdr->p_flags); in _UCD_add_backing_file_at_segment() 343 if (phdr->backing_filesize > phdr->p_memsz) in _UCD_add_backing_file_at_segment() 348 (unsigned long long)phdr->p_memsz, in _UCD_add_backing_file_at_segment() 349 (unsigned long long)phdr->backing_filesize in _UCD_add_backing_file_at_segment() [all …]
|
D | _UCD_destroy.c | 41 struct coredump_phdr *phdr = &ui->phdrs[i]; in _UCD_destroy() local 42 free(phdr->backing_filename); in _UCD_destroy() 43 if (phdr->backing_fd >= 0) in _UCD_destroy() 44 close(phdr->backing_fd); in _UCD_destroy()
|
/external/elfutils/0.153/libelf/ |
D | elf32_getphdr.c | 78 result = elf->state.ELFW(elf,LIBELFBITS).phdr; 125 elf->state.ELFW(elf,LIBELFBITS).phdr = file_phdr; 129 ElfW2(LIBELFBITS,Phdr) *phdr; 133 phdr = elf->state.ELFW(elf,LIBELFBITS).phdr = 135 if (elf->state.ELFW(elf,LIBELFBITS).phdr == NULL) 149 memcpy (phdr, file_phdr, size); 165 CONVERT_TO (phdr[cnt].p_type, notcvt[cnt].p_type); 166 CONVERT_TO (phdr[cnt].p_offset, notcvt[cnt].p_offset); 167 CONVERT_TO (phdr[cnt].p_vaddr, notcvt[cnt].p_vaddr); 168 CONVERT_TO (phdr[cnt].p_paddr, notcvt[cnt].p_paddr); [all …]
|
D | gelf_getphdr.c | 90 Elf32_Phdr *phdr = elf->state.elf32.phdr; local 92 if (phdr == NULL) 95 phdr = INTUSE(elf32_getphdr) (elf); 96 if (phdr == NULL) 117 phdr += ndx; 119 #define COPY(Name) result->Name = phdr->Name 132 Elf64_Phdr *phdr = elf->state.elf64.phdr; local 134 if (phdr == NULL) 137 phdr = INTUSE(elf64_getphdr) (elf); 138 if (phdr == NULL) [all …]
|
D | gelf_update_phdr.c | 79 Elf32_Phdr *phdr = elf->state.elf32.phdr; in gelf_update_phdr() local 95 if (phdr == NULL) in gelf_update_phdr() 97 phdr = __elf32_getphdr_wrlock (elf); in gelf_update_phdr() 98 if (phdr == NULL) in gelf_update_phdr() 115 phdr += ndx; in gelf_update_phdr() 118 phdr->name = src->name in gelf_update_phdr() 130 Elf64_Phdr *phdr = elf->state.elf64.phdr; in gelf_update_phdr() local 132 if (phdr == NULL) in gelf_update_phdr() 134 phdr = __elf64_getphdr_wrlock (elf); in gelf_update_phdr() 135 if (phdr == NULL) in gelf_update_phdr() [all …]
|
D | elf32_newphdr.c | 110 if (elf->state.ELFW(elf,LIBELFBITS).phdr != NULL) 113 free (elf->state.ELFW(elf,LIBELFBITS).phdr); 116 elf->state.ELFW(elf,LIBELFBITS).phdr = NULL; 136 || elf->state.ELFW(elf,LIBELFBITS).phdr == NULL) 141 realloc (elf->state.ELFW(elf,LIBELFBITS).phdr, 148 elf->state.ELFW(elf,LIBELFBITS).phdr = result; 188 result = elf->state.ELFW(elf,LIBELFBITS).phdr;
|
/external/linux-tools-perf/perf-3.12.0/tools/perf/util/ |
D | symbol-minimal.c | 109 Elf32_Phdr *phdr; in filename__read_build_id() local 129 for (i = 0, phdr = buf; i < ehdr.e_phnum; i++, phdr++) { in filename__read_build_id() 133 phdr->p_type = bswap_32(phdr->p_type); in filename__read_build_id() 134 phdr->p_offset = bswap_32(phdr->p_offset); in filename__read_build_id() 135 phdr->p_filesz = bswap_32(phdr->p_filesz); in filename__read_build_id() 138 if (phdr->p_type != PT_NOTE) in filename__read_build_id() 141 buf_size = phdr->p_filesz; in filename__read_build_id() 147 fseek(fp, phdr->p_offset, SEEK_SET); in filename__read_build_id() 158 Elf64_Phdr *phdr; in filename__read_build_id() local 178 for (i = 0, phdr = buf; i < ehdr.e_phnum; i++, phdr++) { in filename__read_build_id() [all …]
|
/external/libunwind/src/dwarf/ |
D | Gfind_unwind_table.c | 43 Elf_W(Phdr) *phdr, *ptxt = NULL, *peh_hdr = NULL, *pdyn = NULL; in dwarf_find_unwind_table() 66 phdr = (Elf_W(Phdr) *) ((char *) ei->image + ehdr->e_phoff); in dwarf_find_unwind_table() 71 switch (phdr[i].p_type) in dwarf_find_unwind_table() 74 if (phdr[i].p_vaddr < start_ip) in dwarf_find_unwind_table() 75 start_ip = phdr[i].p_vaddr; in dwarf_find_unwind_table() 77 if (phdr[i].p_vaddr + phdr[i].p_memsz > end_ip) in dwarf_find_unwind_table() 78 end_ip = phdr[i].p_vaddr + phdr[i].p_memsz; in dwarf_find_unwind_table() 80 if (phdr[i].p_offset == mapoff) in dwarf_find_unwind_table() 81 ptxt = phdr + i; in dwarf_find_unwind_table() 84 if ((uintptr_t) ei->image + phdr->p_filesz > max_load_addr) in dwarf_find_unwind_table() [all …]
|
/external/elfutils/0.153/libdwfl/ |
D | core-file.c | 157 GElf_Phdr *phdr = gelf_getphdr (elf, ndx, &phdr_mem); in dwfl_report_core_segments() local 158 if (unlikely (phdr == NULL)) in dwfl_report_core_segments() 163 switch (phdr->p_type) in dwfl_report_core_segments() 166 result = dwfl_report_segment (dwfl, ndx, phdr, 0, NULL); in dwfl_report_core_segments() 172 *notes = *phdr; in dwfl_report_core_segments() 270 GElf_Phdr phdr; in dwfl_elf_phdr_memory_callback() local 273 if (unlikely (gelf_getphdr (elf, ndx++, &phdr) == NULL)) in dwfl_elf_phdr_memory_callback() 275 while (phdr.p_type != PT_LOAD in dwfl_elf_phdr_memory_callback() 276 || ((phdr.p_vaddr + phdr.p_memsz + align - 1) & -align) <= vaddr); in dwfl_elf_phdr_memory_callback() 278 GElf_Off start = vaddr - phdr.p_vaddr + phdr.p_offset; in dwfl_elf_phdr_memory_callback() [all …]
|
D | link_map.c | 479 GElf_Phdr *phdr = gelf_getphdr (mod->main.elf, i, &phdr_mem); in consider_executable() local 480 if (phdr == NULL) in consider_executable() 483 if (phdr->p_align > 1 && (align == 0 || phdr->p_align < align)) in consider_executable() 484 align = phdr->p_align; in consider_executable() 487 && phdr->p_type == PT_LOAD in consider_executable() 488 && (phdr->p_offset & -align) == (ehdr.e_phoff & -align)) in consider_executable() 495 if (ehdr.e_phoff - phdr->p_offset + phdr->p_vaddr != at_phdr) in consider_executable() 503 if (((ehdr.e_phoff - phdr->p_offset + phdr->p_vaddr) & -align) in consider_executable() 508 GElf_Addr bias = (at_phdr - (ehdr.e_phoff - phdr->p_offset in consider_executable() 509 + phdr->p_vaddr)); in consider_executable() [all …]
|
D | segment.c | 301 dwfl_report_segment (Dwfl *dwfl, int ndx, const GElf_Phdr *phdr, GElf_Addr bias, in INTDEF() 310 if (phdr->p_align > 1 && (dwfl->segment_align <= 1 || in INTDEF() 311 phdr->p_align < dwfl->segment_align)) in INTDEF() 312 dwfl->segment_align = phdr->p_align; in INTDEF() 320 GElf_Addr start = segment_start (dwfl, bias + phdr->p_vaddr); in INTDEF() 321 GElf_Addr end = segment_end (dwfl, bias + phdr->p_vaddr + phdr->p_memsz); in INTDEF() 328 || phdr->p_offset != dwfl->lookup_tail_offset) in INTDEF() 345 dwfl->lookup_tail_offset = end - bias - phdr->p_vaddr + phdr->p_offset; in INTDEF()
|
/external/qemu/include/hw/ |
D | elf_ops.h | 18 static void glue(bswap_phdr, SZ)(struct elf_phdr *phdr) in glue() 20 bswap32s(&phdr->p_type); /* Segment type */ in glue() 21 bswapSZs(&phdr->p_offset); /* Segment file offset */ in glue() 22 bswapSZs(&phdr->p_vaddr); /* Segment virtual address */ in glue() 23 bswapSZs(&phdr->p_paddr); /* Segment physical address */ in glue() 24 bswapSZs(&phdr->p_filesz); /* Segment size in file */ in glue() 25 bswapSZs(&phdr->p_memsz); /* Segment size in memory */ in glue() 26 bswap32s(&phdr->p_flags); /* Segment flags */ in glue() 27 bswapSZs(&phdr->p_align); /* Segment alignment */ in glue() 185 struct elf_phdr *phdr = NULL, *ph; in glue() local [all …]
|
/external/chromium_org/components/nacl/loader/nonsfi/ |
D | elf_loader.cc | 124 const ElfW(Phdr)& phdr = phdrs[i]; in GetLoadSize() 125 if (phdr.p_type != PT_LOAD) { in GetLoadSize() 130 begin = std::min(begin, phdr.p_vaddr); in GetLoadSize() 131 end = std::max(end, phdr.p_vaddr + phdr.p_memsz); in GetLoadSize() 182 const ElfW(Phdr)& phdr = phdrs[i]; in LoadSegments() 183 if (phdr.p_type != PT_LOAD) { in LoadSegments() 189 ElfW(Addr) seg_start = phdr.p_vaddr + load_bias; in LoadSegments() 190 ElfW(Addr) seg_end = seg_start + phdr.p_memsz; in LoadSegments() 193 ElfW(Addr) seg_file_end = seg_start + phdr.p_filesz; in LoadSegments() 196 ElfW(Addr) file_start = phdr.p_offset; in LoadSegments() [all …]
|
/external/wpa_supplicant_8/src/eap_peer/ |
D | ikev2.c | 843 struct ikev2_payload_hdr *phdr; in ikev2_build_sar1() local 851 phdr = wpabuf_put(msg, sizeof(*phdr)); in ikev2_build_sar1() 852 phdr->next_payload = next_payload; in ikev2_build_sar1() 853 phdr->flags = 0; in ikev2_build_sar1() 892 plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) phdr; in ikev2_build_sar1() 893 WPA_PUT_BE16(phdr->payload_length, plen); in ikev2_build_sar1() 902 struct ikev2_payload_hdr *phdr; in ikev2_build_ker() local 915 phdr = wpabuf_put(msg, sizeof(*phdr)); in ikev2_build_ker() 916 phdr->next_payload = next_payload; in ikev2_build_ker() 917 phdr->flags = 0; in ikev2_build_ker() [all …]
|
/external/elfutils/0.153/libdw/ |
D | dwarf_getcfi_elf.c | 147 getcfi_gnu_eh_frame (Elf *elf, const GElf_Ehdr *ehdr, const GElf_Phdr *phdr) in getcfi_gnu_eh_frame() argument 149 if (unlikely (phdr->p_filesz < 4)) in getcfi_gnu_eh_frame() 152 Elf_Data *data = elf_getdata_rawchunk (elf, phdr->p_offset, phdr->p_filesz, in getcfi_gnu_eh_frame() 166 const uint8_t *search_table = parse_eh_frame_hdr (data->d_buf, phdr->p_filesz, in getcfi_gnu_eh_frame() 167 phdr->p_vaddr, ehdr, in getcfi_gnu_eh_frame() 174 Dwarf_Off eh_frame_offset = eh_frame_ptr - phdr->p_vaddr + phdr->p_offset; in getcfi_gnu_eh_frame() 199 cfi->search_table_vaddr = phdr->p_vaddr; in getcfi_gnu_eh_frame() 218 GElf_Phdr *phdr = gelf_getphdr (elf, i, &phdr_mem); in getcfi_phdr() local 219 if (unlikely (phdr == NULL)) in getcfi_phdr() 221 if (phdr->p_type == PT_GNU_EH_FRAME) in getcfi_phdr() [all …]
|
/external/wpa_supplicant_8/src/eap_server/ |
D | ikev2.c | 907 struct ikev2_payload_hdr *phdr; in ikev2_build_sai() local 915 phdr = wpabuf_put(msg, sizeof(*phdr)); in ikev2_build_sai() 916 phdr->next_payload = next_payload; in ikev2_build_sai() 917 phdr->flags = 0; in ikev2_build_sai() 957 plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) phdr; in ikev2_build_sai() 958 WPA_PUT_BE16(phdr->payload_length, plen); in ikev2_build_sai() 967 struct ikev2_payload_hdr *phdr; in ikev2_build_kei() local 981 phdr = wpabuf_put(msg, sizeof(*phdr)); in ikev2_build_kei() 982 phdr->next_payload = next_payload; in ikev2_build_kei() 983 phdr->flags = 0; in ikev2_build_kei() [all …]
|
/external/libunwind/src/ia64/ |
D | Gfind_unwind_table.c | 99 Elf64_Phdr *phdr, *ptxt = NULL, *punw = NULL, *pdyn = NULL; in ia64_find_unwind_table() local 107 phdr = (Elf64_Phdr *) ((char *) edi->ei.image + ehdr->e_phoff); in ia64_find_unwind_table() 111 switch (phdr[i].p_type) in ia64_find_unwind_table() 114 if (phdr[i].p_offset == mapoff) in ia64_find_unwind_table() 115 ptxt = phdr + i; in ia64_find_unwind_table() 119 punw = phdr + i; in ia64_find_unwind_table() 123 pdyn = phdr + i; in ia64_find_unwind_table()
|
D | Gtables.c | 475 const Elf64_Phdr *phdr, *p_unwind, *p_dynamic, *p_text; in callback() local 487 phdr = info->dlpi_phdr; in callback() 495 for (n = info->dlpi_phnum; --n >= 0; phdr++) in callback() 497 if (phdr->p_type == PT_LOAD) in callback() 499 Elf64_Addr vaddr = phdr->p_vaddr + load_base; in callback() 501 && di->u.ti.segbase < vaddr + phdr->p_memsz) in callback() 502 p_text = phdr; in callback() 504 else if (phdr->p_type == PT_IA_64_UNWIND) in callback() 505 p_unwind = phdr; in callback() 506 else if (phdr->p_type == PT_DYNAMIC) in callback() [all …]
|
/external/compiler-rt/lib/lsan/ |
D | lsan_common_linux.cc | 59 const ElfW(Phdr) *phdr = &(info->dlpi_phdr[j]); in ProcessGlobalRegionsCallback() 62 if (!(phdr->p_flags & PF_W) || (phdr->p_type != PT_LOAD) || in ProcessGlobalRegionsCallback() 63 (phdr->p_memsz == 0)) in ProcessGlobalRegionsCallback() 65 uptr begin = info->dlpi_addr + phdr->p_vaddr; in ProcessGlobalRegionsCallback() 66 uptr end = begin + phdr->p_memsz; in ProcessGlobalRegionsCallback()
|
/external/wpa_supplicant_8/src/eap_common/ |
D | ikev2_common.c | 249 const struct ikev2_payload_hdr *phdr; in ikev2_parse_payloads() local 258 if (end - pos < (int) sizeof(*phdr)) { in ikev2_parse_payloads() 263 phdr = (const struct ikev2_payload_hdr *) pos; in ikev2_parse_payloads() 264 plen = WPA_GET_BE16(phdr->payload_length); in ikev2_parse_payloads() 265 if (plen < (int) sizeof(*phdr) || pos + plen > end) { in ikev2_parse_payloads() 273 phdr->next_payload, phdr->flags, plen); in ikev2_parse_payloads() 275 pdata = (const u8 *) (phdr + 1); in ikev2_parse_payloads() 276 pdatalen = plen - sizeof(*phdr); in ikev2_parse_payloads() 329 if (phdr->flags & IKEV2_PAYLOAD_FLAGS_CRITICAL) { in ikev2_parse_payloads() 348 payloads->encr_next_payload = phdr->next_payload; in ikev2_parse_payloads() [all …]
|