Home
last modified time | relevance | path

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

1234

/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 …]
Delf32_newphdr.c90 if (elf->state.ELFW(elf,LIBELFBITS).phdr != NULL) in ElfW2()
93 free (elf->state.ELFW(elf,LIBELFBITS).phdr); in ElfW2()
96 elf->state.ELFW(elf,LIBELFBITS).phdr = NULL; in ElfW2()
116 || elf->state.ELFW(elf,LIBELFBITS).phdr == NULL) in ElfW2()
138 realloc (elf->state.ELFW(elf,LIBELFBITS).phdr, in ElfW2()
145 elf->state.ELFW(elf,LIBELFBITS).phdr = result; in ElfW2()
184 result = elf->state.ELFW(elf,LIBELFBITS).phdr; in ElfW2()
/external/elfutils/tests/
Dvendorelf.c89 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 …]
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.c110 Elf32_Phdr *phdr = elf32_newphdr (elf, 2); in main() local
111 if (phdr == NULL) in main()
117 phdr[0].p_type = PT_PHDR; in main()
118 phdr[1].p_type = PT_DYNAMIC; in main()
229 phdr[0].p_offset = ehdr->e_phoff; in main()
230 phdr[0].p_vaddr = ehdr->e_phoff; in main()
231 phdr[0].p_paddr = ehdr->e_phoff; in main()
232 phdr[0].p_flags = PF_R | PF_X; in main()
233 phdr[0].p_filesz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT); in main()
234 phdr[0].p_memsz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT); in main()
[all …]
Dupdate2.c40 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 …]
Dupdate3.c42 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 …]
Dupdate4.c42 Elf32_Phdr *phdr; in main() local
105 phdr = elf32_newphdr (elf, 1); in main()
106 if (phdr == NULL) in main()
112 phdr[0].p_type = PT_PHDR; in main()
312 phdr[0].p_offset = ehdr->e_phoff; in main()
313 phdr[0].p_offset = ehdr->e_phoff; in main()
314 phdr[0].p_vaddr = ehdr->e_phoff; in main()
315 phdr[0].p_paddr = ehdr->e_phoff; in main()
316 phdr[0].p_flags = PF_R | PF_X; in main()
317 phdr[0].p_filesz = ehdr->e_phnum * elf32_fsize (ELF_T_PHDR, 1, EV_CURRENT); in main()
[all …]
/external/linux-kselftest/tools/testing/selftests/kvm/lib/
Delf.c149 Elf64_Phdr phdr; in kvm_vm_elf_load() local
150 test_read(fd, &phdr, sizeof(phdr)); in kvm_vm_elf_load()
153 if (phdr.p_type != PT_LOAD) in kvm_vm_elf_load()
157 TEST_ASSERT(phdr.p_memsz > 0, "Unexpected loadable segment " in kvm_vm_elf_load()
160 n1, (uint64_t) phdr.p_memsz); in kvm_vm_elf_load()
161 vm_vaddr_t seg_vstart = phdr.p_vaddr; in kvm_vm_elf_load()
163 vm_vaddr_t seg_vend = phdr.p_vaddr + phdr.p_memsz - 1; in kvm_vm_elf_load()
183 if (phdr.p_filesz) { in kvm_vm_elf_load()
184 offset_rv = lseek(fd, phdr.p_offset, SEEK_SET); in kvm_vm_elf_load()
185 TEST_ASSERT(offset_rv == phdr.p_offset, in kvm_vm_elf_load()
[all …]
/external/llvm-project/compiler-rt/lib/hwasan/
Dhwasan_globals.cpp27 static void CheckCodeModel(ElfW(Addr) base, const ElfW(Phdr) * phdr, in CheckCodeModel() argument
31 if (phdr[i].p_type != PT_LOAD) in CheckCodeModel()
33 ElfW(Addr) lo = base + phdr[i].p_vaddr, hi = lo + phdr[i].p_memsz; in CheckCodeModel()
51 const ElfW(Phdr) * phdr, in HwasanGlobalsFor()
55 if (phdr[i].p_type != PT_NOTE) in HwasanGlobalsFor()
58 const char *note = reinterpret_cast<const char *>(base + phdr[i].p_vaddr); in HwasanGlobalsFor()
59 const char *nend = note + phdr[i].p_memsz; in HwasanGlobalsFor()
76 CheckCodeModel(base, phdr, phnum); in HwasanGlobalsFor()
/external/wpa_supplicant_8/src/eap_peer/
Dikev2.c844 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 …]
/external/elfutils/libdw/
Ddwarf_getcfi_elf.c128 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 …]
/external/wpa_supplicant_8/src/eap_server/
Dikev2.c906 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 …]
/external/llvm-project/libunwind/src/
DAddressSpace.hpp379 const Elf_Phdr *phdr = &pinfo->dlpi_phdr[i]; in calculateImageBase() local
380 if (phdr->p_type == PT_PHDR) { in calculateImageBase()
382 phdr->p_vaddr; in calculateImageBase()
405 static bool checkAddrInSegment(const Elf_Phdr *phdr, size_t image_base, in checkAddrInSegment() argument
407 if (phdr->p_type == PT_LOAD) { in checkAddrInSegment()
408 uintptr_t begin = image_base + phdr->p_vaddr; in checkAddrInSegment()
409 uintptr_t end = begin + phdr->p_memsz; in checkAddrInSegment()
412 cbdata->sects->text_segment_length = phdr->p_memsz; in checkAddrInSegment()
419 static bool checkForUnwindInfoSegment(const Elf_Phdr *phdr, size_t image_base, in checkForUnwindInfoSegment() argument
422 if (phdr->p_type == PT_GNU_EH_FRAME) { in checkForUnwindInfoSegment()
[all …]
/external/elfutils/libdwfl/
Dcore-file.c138 GElf_Phdr *phdr = gelf_getphdr (elf, ndx, &phdr_mem); in dwfl_report_core_segments() local
139 if (unlikely (phdr == NULL)) in dwfl_report_core_segments()
144 switch (phdr->p_type) in dwfl_report_core_segments()
147 result = dwfl_report_segment (dwfl, ndx, phdr, 0, NULL); in dwfl_report_core_segments()
153 *notes = *phdr; in dwfl_report_core_segments()
279 #define more(size) do_more (size, &phdr, align, elf, start, &ndx, &end, &end_vaddr)
301 GElf_Phdr phdr; in dwfl_elf_phdr_memory_callback() local
304 if (unlikely (gelf_getphdr (elf, ndx++, &phdr) == NULL)) in dwfl_elf_phdr_memory_callback()
306 while (phdr.p_type != PT_LOAD in dwfl_elf_phdr_memory_callback()
307 || ((phdr.p_vaddr + phdr.p_memsz + align - 1) & -align) <= vaddr); in dwfl_elf_phdr_memory_callback()
[all …]
Dlink_map.c571 GElf_Phdr *phdr = gelf_getphdr (mod->main.elf, i, &phdr_mem); in consider_executable() local
572 if (phdr == NULL) in consider_executable()
575 if (phdr->p_align > 1 && (align == 0 || phdr->p_align < align)) in consider_executable()
576 align = phdr->p_align; in consider_executable()
579 && phdr->p_type == PT_LOAD in consider_executable()
580 && (phdr->p_offset & -align) == (ehdr.e_phoff & -align)) in consider_executable()
587 if (ehdr.e_phoff - phdr->p_offset + phdr->p_vaddr != at_phdr) in consider_executable()
595 if (((ehdr.e_phoff - phdr->p_offset + phdr->p_vaddr) & -align) in consider_executable()
600 GElf_Addr bias = (at_phdr - (ehdr.e_phoff - phdr->p_offset in consider_executable()
601 + phdr->p_vaddr)); in consider_executable()
[all …]
Dlinux-core-attach.c69 GElf_Phdr phdr_mem, *phdr = gelf_getphdr (core, cnt, &phdr_mem); in core_memory_read() local
70 if (phdr == NULL || phdr->p_type != PT_LOAD) in core_memory_read()
73 GElf_Addr start = __libdwfl_segment_start (dwfl, phdr->p_vaddr); in core_memory_read()
75 phdr->p_vaddr + phdr->p_memsz); in core_memory_read()
80 data = elf_getdata_rawchunk (core, phdr->p_offset + addr - start, in core_memory_read()
356 GElf_Phdr phdr_mem, *phdr = gelf_getphdr (core, cnt, &phdr_mem); in dwfl_core_file_attach() local
357 if (phdr != NULL && phdr->p_type == PT_NOTE) in dwfl_core_file_attach()
359 note_data = elf_getdata_rawchunk (core, phdr->p_offset, in dwfl_core_file_attach()
360 phdr->p_filesz, (phdr->p_align == 8 in dwfl_core_file_attach()
/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()
91 (phdr->p_align == 8 in find_elf_build_id()
94 phdr->p_vaddr, in find_elf_build_id()
/external/llvm-project/compiler-rt/lib/lsan/
Dlsan_common_linux.cpp83 const ElfW(Phdr) *phdr = &(info->dlpi_phdr[j]); in ProcessGlobalRegionsCallback()
86 if (!(phdr->p_flags & PF_W) || (phdr->p_type != PT_LOAD) || in ProcessGlobalRegionsCallback()
87 (phdr->p_memsz == 0)) in ProcessGlobalRegionsCallback()
89 uptr begin = info->dlpi_addr + phdr->p_vaddr; in ProcessGlobalRegionsCallback()
90 uptr end = begin + phdr->p_memsz; in ProcessGlobalRegionsCallback()
/external/linux-kselftest/tools/testing/selftests/powerpc/ptrace/
Dcore-pkey.c199 Elf64_Phdr *phdr; in check_core_file() local
216 phdr_size = sizeof(*phdr) * ehdr->e_phnum; in check_core_file()
223 for (phdr = p + ehdr->e_phoff; in check_core_file()
224 (void *) phdr < p + ehdr->e_phoff + phdr_size; in check_core_file()
225 phdr += ehdr->e_phentsize) in check_core_file()
226 if (phdr->p_type == PT_NOTE) in check_core_file()
229 FAIL_IF((void *) phdr >= p + ehdr->e_phoff + phdr_size); in check_core_file()
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()
238 FAIL_IF((void *) nhdr >= p + phdr->p_offset + phdr->p_filesz); in check_core_file()
/external/elfutils/src/
Delflint.c499 GElf_Phdr *phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem); in check_elf_header() local
500 if (phdr == NULL) in check_elf_header()
871 GElf_Phdr *phdr = NULL; in check_symtab() local
876 phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem); in check_symtab()
877 if (phdr != NULL && phdr->p_type == PT_TLS) in check_symtab()
888 else if (phdr == NULL) in check_symtab()
897 < destshdr->sh_offset - phdr->p_offset) in check_symtab()
903 > (destshdr->sh_offset - phdr->p_offset in check_symtab()
910 > (destshdr->sh_offset - phdr->p_offset in check_symtab()
1038 GElf_Phdr *phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem); in check_symtab() local
[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/compiler-rt/lib/lsan/
Dlsan_common_linux.cc62 const ElfW(Phdr) *phdr = &(info->dlpi_phdr[j]); in ProcessGlobalRegionsCallback()
65 if (!(phdr->p_flags & PF_W) || (phdr->p_type != PT_LOAD) || in ProcessGlobalRegionsCallback()
66 (phdr->p_memsz == 0)) in ProcessGlobalRegionsCallback()
68 uptr begin = info->dlpi_addr + phdr->p_vaddr; in ProcessGlobalRegionsCallback()
69 uptr end = begin + phdr->p_memsz; in ProcessGlobalRegionsCallback()

1234