Home
last modified time | relevance | path

Searched refs:phdr (Results 1 – 25 of 84) sorted by relevance

1234

/external/libunwind/src/coredump/
D_UCD_elf_map_image.c30 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.c40 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.c315 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.c41 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/libunwind/src/dwarf/
DGfind_unwind_table.c37 Elf_W(Phdr) phdr; in get_dyn_gp()
38 GET_PHDR_FIELD(ei, dyn_phdr_offset, &phdr, p_offset); in get_dyn_gp()
40 Elf_W(Off) dyn_offset = phdr.p_offset; in get_dyn_gp()
62 Elf_W(Phdr) phdr; in get_eh_frame_info()
63 GET_PHDR_FIELD(ei, phdr_offset, &phdr, p_offset); in get_eh_frame_info()
64 unw_word_t hdr_offset = phdr.p_offset; in get_eh_frame_info()
67 if (sizeof(hdr) != elf_w (memory_read) (ei, ei->u.memory.start + phdr.p_offset, in get_eh_frame_info()
114 GET_PHDR_FIELD(ei, phdr_offset, &phdr, p_vaddr); in get_eh_frame_info()
115 GET_PHDR_FIELD(ei, phdr_offset, &phdr, p_offset); in get_eh_frame_info()
117 load_base + phdr.p_vaddr + addr - (uintptr_t) ei->u.memory.start - phdr.p_offset; in get_eh_frame_info()
[all …]
/external/elfutils/libelf/
Delf32_getphdr.c56 result = elf->state.ELFW(elf,LIBELFBITS).phdr; in ElfW2()
115 elf->state.ELFW(elf,LIBELFBITS).phdr = file_phdr; in ElfW2()
119 ElfW2(LIBELFBITS,Phdr) *phdr; in ElfW2()
123 phdr = elf->state.ELFW(elf,LIBELFBITS).phdr = in ElfW2()
125 if (elf->state.ELFW(elf,LIBELFBITS).phdr == NULL) in ElfW2()
139 memcpy (phdr, file_phdr, size); in ElfW2()
162 CONVERT_TO (phdr[cnt].p_type, notcvt[cnt].p_type); in ElfW2()
163 CONVERT_TO (phdr[cnt].p_offset, notcvt[cnt].p_offset); in ElfW2()
164 CONVERT_TO (phdr[cnt].p_vaddr, notcvt[cnt].p_vaddr); in ElfW2()
165 CONVERT_TO (phdr[cnt].p_paddr, notcvt[cnt].p_paddr); in ElfW2()
[all …]
Dgelf_getphdr.c66 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 …]
Dgelf_update_phdr.c58 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 …]
/external/elfutils/tests/
Dshowptable.c89 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 …]
Dalldts.c109 Elf32_Phdr *phdr = elf32_newphdr (elf, 2); in main() local
110 if (phdr == NULL) in main()
116 phdr[0].p_type = PT_PHDR; in main()
117 phdr[1].p_type = PT_DYNAMIC; in main()
228 phdr[0].p_offset = ehdr->e_phoff; in main()
229 phdr[0].p_vaddr = ehdr->e_phoff; in main()
230 phdr[0].p_paddr = ehdr->e_phoff; in main()
231 phdr[0].p_flags = PF_R | PF_X; in main()
232 phdr[0].p_filesz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT); in main()
233 phdr[0].p_memsz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT); in main()
[all …]
Dupdate2.c39 Elf32_Phdr *phdr; in main() local
91 phdr = elf32_newphdr (elf, 1); in main()
92 if (phdr == NULL) in main()
98 phdr[0].p_type = PT_PHDR; in main()
110 phdr[0].p_offset = ehdr->e_phoff; in main()
111 phdr[0].p_offset = ehdr->e_phoff; in main()
112 phdr[0].p_vaddr = ehdr->e_phoff; in main()
113 phdr[0].p_paddr = ehdr->e_phoff; in main()
114 phdr[0].p_flags = PF_R | PF_X; in main()
115 phdr[0].p_filesz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT); in main()
[all …]
Dupdate3.c41 Elf32_Phdr *phdr; in main() local
100 phdr = elf32_newphdr (elf, 1); in main()
101 if (phdr == NULL) in main()
107 phdr[0].p_type = PT_PHDR; in main()
159 phdr[0].p_offset = ehdr->e_phoff; in main()
160 phdr[0].p_offset = ehdr->e_phoff; in main()
161 phdr[0].p_vaddr = ehdr->e_phoff; in main()
162 phdr[0].p_paddr = ehdr->e_phoff; in main()
163 phdr[0].p_flags = PF_R | PF_X; in main()
164 phdr[0].p_filesz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT); in main()
[all …]
Dupdate4.c41 Elf32_Phdr *phdr; in main() local
104 phdr = elf32_newphdr (elf, 1); in main()
105 if (phdr == NULL) in main()
111 phdr[0].p_type = PT_PHDR; in main()
311 phdr[0].p_offset = ehdr->e_phoff; in main()
312 phdr[0].p_offset = ehdr->e_phoff; in main()
313 phdr[0].p_vaddr = ehdr->e_phoff; in main()
314 phdr[0].p_paddr = ehdr->e_phoff; in main()
315 phdr[0].p_flags = PF_R | PF_X; in main()
316 phdr[0].p_filesz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT); in main()
[all …]
/external/wpa_supplicant_8/src/eap_peer/
Dikev2.c843 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/libdw/
Ddwarf_getcfi_elf.c126 getcfi_gnu_eh_frame (Elf *elf, const GElf_Ehdr *ehdr, const GElf_Phdr *phdr) in getcfi_gnu_eh_frame() argument
128 Elf_Data *data = elf_getdata_rawchunk (elf, phdr->p_offset, phdr->p_filesz, in getcfi_gnu_eh_frame()
142 const uint8_t *search_table = parse_eh_frame_hdr (data->d_buf, phdr->p_filesz, in getcfi_gnu_eh_frame()
143 phdr->p_vaddr, ehdr, in getcfi_gnu_eh_frame()
152 dmax = phdr->p_filesz - (search_table - (const uint8_t *) data->d_buf); in getcfi_gnu_eh_frame()
158 Dwarf_Off eh_frame_offset = eh_frame_ptr - phdr->p_vaddr + phdr->p_offset; in getcfi_gnu_eh_frame()
183 cfi->search_table_len = phdr->p_filesz; in getcfi_gnu_eh_frame()
184 cfi->search_table_vaddr = phdr->p_vaddr; in getcfi_gnu_eh_frame()
203 GElf_Phdr *phdr = gelf_getphdr (elf, i, &phdr_mem); in getcfi_phdr() local
204 if (unlikely (phdr == NULL)) in getcfi_phdr()
[all …]
/external/wpa_supplicant_8/src/eap_server/
Dikev2.c907 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/elfutils/libdwfl/
Dcore-file.c139 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 …]
Dlink_map.c549 GElf_Phdr *phdr = gelf_getphdr (mod->main.elf, i, &phdr_mem); in consider_executable() local
550 if (phdr == NULL) in consider_executable()
553 if (phdr->p_align > 1 && (align == 0 || phdr->p_align < align)) in consider_executable()
554 align = phdr->p_align; in consider_executable()
557 && phdr->p_type == PT_LOAD in consider_executable()
558 && (phdr->p_offset & -align) == (ehdr.e_phoff & -align)) in consider_executable()
565 if (ehdr.e_phoff - phdr->p_offset + phdr->p_vaddr != at_phdr) in consider_executable()
573 if (((ehdr.e_phoff - phdr->p_offset + phdr->p_vaddr) & -align) in consider_executable()
578 GElf_Addr bias = (at_phdr - (ehdr.e_phoff - phdr->p_offset in consider_executable()
579 + phdr->p_vaddr)); in consider_executable()
[all …]
Dsegment.c283 dwfl_report_segment (Dwfl *dwfl, int ndx, const GElf_Phdr *phdr, GElf_Addr bias, in INTDEF()
292 if (phdr->p_align > 1 && (dwfl->segment_align <= 1 || in INTDEF()
293 phdr->p_align < dwfl->segment_align)) in INTDEF()
294 dwfl->segment_align = phdr->p_align; in INTDEF()
302 GElf_Addr start = __libdwfl_segment_start (dwfl, bias + phdr->p_vaddr); in INTDEF()
304 bias + phdr->p_vaddr + phdr->p_memsz); in INTDEF()
311 || phdr->p_offset != dwfl->lookup_tail_offset) in INTDEF()
328 dwfl->lookup_tail_offset = end - bias - phdr->p_vaddr + phdr->p_offset; in INTDEF()
/external/libunwind/src/
Delfxx.c258 Elf_W(Phdr) phdr; in elf_w()
259 GET_PHDR_FIELD(ei, offset, &phdr, p_type); in elf_w()
260 if (phdr.p_type == PT_LOAD) { in elf_w()
261 GET_PHDR_FIELD(ei, offset, &phdr, p_offset); in elf_w()
262 if (phdr.p_offset == mapoff) { in elf_w()
263 GET_PHDR_FIELD(ei, offset, &phdr, p_vaddr); in elf_w()
264 *load_offset = segbase - phdr.p_vaddr; in elf_w()
394 Elf_W(Phdr) *phdr = (Elf_W(Phdr) *) ((char *) ei->u.mapped.image + ehdr->e_phoff); in elf_w()
398 if (phdr[i].p_type == PT_LOAD && phdr[i].p_offset == mapoff) { in elf_w()
399 *load_offset = segbase - phdr[i].p_vaddr; in elf_w()
[all …]
/external/libunwind/src/ia64/
DGfind_unwind_table.c99 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()
DGtables.c475 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/wpa_supplicant_8/src/eap_common/
Dikev2_common.c248 const struct ikev2_payload_hdr *phdr; in ikev2_parse_payloads() local
260 if (left < sizeof(*phdr)) { in ikev2_parse_payloads()
266 phdr = (const struct ikev2_payload_hdr *) pos; in ikev2_parse_payloads()
267 plen = WPA_GET_BE16(phdr->payload_length); in ikev2_parse_payloads()
268 if (plen < sizeof(*phdr) || plen > left) { in ikev2_parse_payloads()
276 phdr->next_payload, phdr->flags, plen); in ikev2_parse_payloads()
278 pdata = (const u8 *) (phdr + 1); in ikev2_parse_payloads()
279 pdatalen = plen - sizeof(*phdr); in ikev2_parse_payloads()
332 if (phdr->flags & IKEV2_PAYLOAD_FLAGS_CRITICAL) { in ikev2_parse_payloads()
351 payloads->encr_next_payload = phdr->next_payload; in ikev2_parse_payloads()
[all …]
/external/elfutils/src/
Delflint.c850 GElf_Phdr *phdr = NULL; in check_symtab() local
855 phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem); in check_symtab()
856 if (phdr != NULL && phdr->p_type == PT_TLS) in check_symtab()
867 else if (phdr == NULL) in check_symtab()
876 < destshdr->sh_offset - phdr->p_offset) in check_symtab()
882 > (destshdr->sh_offset - phdr->p_offset in check_symtab()
889 > (destshdr->sh_offset - phdr->p_offset in check_symtab()
1017 GElf_Phdr *phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem); in check_symtab() local
1019 if (phdr != NULL && phdr->p_type == PT_DYNAMIC) in check_symtab()
1021 if (sym->st_value != phdr->p_vaddr) in check_symtab()
[all …]
/external/elfutils/libdwelf/
Ddwelf_elf_gnu_build_id.c86 GElf_Phdr *phdr = gelf_getphdr (elf, i, &phdr_mem); in find_elf_build_id() local
87 if (likely (phdr != NULL) && phdr->p_type == PT_NOTE) in find_elf_build_id()
89 phdr->p_offset, in find_elf_build_id()
90 phdr->p_filesz, in find_elf_build_id()
92 phdr->p_vaddr, in find_elf_build_id()

1234