/external/libunwind/src/coredump/ |
_UCD_elf_map_image.c | 30 CD_elf_map_image(struct UCD_info *ui, coredump_phdr_t *phdr) 34 if (phdr->backing_fd < 0) 36 /* Note: coredump file contains only phdr->p_filesz bytes. 37 * We want to map bigger area (phdr->p_memsz bytes) to make sure 41 ei->image = mmap(NULL, phdr->p_memsz, PROT_READ, MAP_PRIVATE, ui->coredump_fd, phdr->p_offset); 47 ei->size = phdr->p_filesz; 48 size_t remainder_len = phdr->p_memsz - phdr->p_filesz; 51 void *remainder_base = (char*) ei->image + phdr->p_filesz 90 coredump_phdr_t *phdr = &ui->phdrs[i]; local [all...] |
_UCD_access_mem.c | 40 coredump_phdr_t *phdr; local 44 phdr = &ui->phdrs[i]; 45 if (phdr->p_vaddr <= addr && addr_last < phdr->p_vaddr + phdr->p_memsz) 58 if (addr_last >= phdr->p_vaddr + phdr->p_filesz) 62 if (phdr->backing_fd < 0) 64 Debug(1, "access to not-present data in phdr[%d]: addr:0x%llx\n", 69 filename = phdr->backing_filename [all...] |
_UCD_destroy.c | 41 struct coredump_phdr *phdr = &ui->phdrs[i]; local 42 free(phdr->backing_filename); 43 if (phdr->backing_fd >= 0) 44 close(phdr->backing_fd);
|
_UCD_create.c | 212 Debug(2, "phdr[%03d]: type:%d", i, cur->p_type); 315 struct coredump_phdr *phdr = &ui->phdrs[phdr_no]; local 316 if (phdr->backing_filename) 329 phdr->backing_fd = fd; 330 phdr->backing_filename = strdup(filename); 338 phdr->backing_filesize = (uoff_t)statbuf.st_size; 340 if (phdr->p_flags != (PF_X | PF_R)) 341 Debug(1, "Note: phdr[%u] is not r-x: flags are 0x%x\n", phdr_no, phdr->p_flags); 343 if (phdr->backing_filesize > phdr->p_memsz 410 struct coredump_phdr *phdr = &ui->phdrs[i]; local [all...] |
/external/chromium_org/third_party/android_crazy_linker/src/src/ |
linker_phdr.cpp | 64 We will ignore the p_paddr and p_align fields of ELF::Phdr for now. 141 size_t phdr_table_get_load_size(const ELF::Phdr* phdr_table, 150 const ELF::Phdr* phdr = &phdr_table[i]; local 152 if (phdr->p_type != PT_LOAD) { 157 if (phdr->p_vaddr < min_vaddr) { 158 min_vaddr = phdr->p_vaddr; 161 if (phdr->p_vaddr + phdr->p_memsz > max_vaddr) { 162 max_vaddr = phdr->p_vaddr + phdr->p_memsz 189 const ELF::Phdr* phdr = phdr_table; local 263 const ELF::Phdr* phdr; local 349 const ELF::Phdr* phdr = phdr_table; local 386 const ELF::Phdr* phdr = phdr_table; local [all...] |
crazy_linker_elf_loader.cpp | 155 if (phdr_num_ < 1 || phdr_num_ > 65536 / sizeof(ELF::Phdr)) { 162 PAGE_END(header_.e_phoff + (phdr_num_ * sizeof(ELF::Phdr))); 170 error->Format("Phdr mmap failed: %s", strerror(errno)); 175 phdr_table_ = reinterpret_cast<ELF::Phdr*>( 219 const ELF::Phdr* phdr_limit = phdr_table_ + phdr_num_; 222 for (const ELF::Phdr* phdr = phdr_table_; phdr < phdr_limit; ++phdr) { 223 if (phdr->p_type == PT_PHDR) 273 const ELF::Phdr* phdr = &phdr_table_[i]; local [all...] |
crazy_linker_elf_view.cpp | 16 const ELF::Phdr* phdr, 21 load_size_ = phdr_table_get_load_size(phdr, phdr_count, &min_vaddr, NULL); 30 phdr_table_get_dynamic_section(phdr, 42 // This is different from |phdr|..|phdr + phdr_count| which can actually 44 const ELF::Phdr* phdr0 = NULL; 48 const ELF::Phdr* entry = &phdr[n]; 60 const ELF::Phdr* entry = &phdr[n] [all...] |
/ndk/sources/android/crazy_linker/src/ |
linker_phdr.cpp | 64 We will ignore the p_paddr and p_align fields of ELF::Phdr for now. 141 size_t phdr_table_get_load_size(const ELF::Phdr* phdr_table, 150 const ELF::Phdr* phdr = &phdr_table[i]; local 152 if (phdr->p_type != PT_LOAD) { 157 if (phdr->p_vaddr < min_vaddr) { 158 min_vaddr = phdr->p_vaddr; 161 if (phdr->p_vaddr + phdr->p_memsz > max_vaddr) { 162 max_vaddr = phdr->p_vaddr + phdr->p_memsz 189 const ELF::Phdr* phdr = phdr_table; local 263 const ELF::Phdr* phdr; local 349 const ELF::Phdr* phdr = phdr_table; local 386 const ELF::Phdr* phdr = phdr_table; local [all...] |
crazy_linker_elf_loader.cpp | 155 if (phdr_num_ < 1 || phdr_num_ > 65536 / sizeof(ELF::Phdr)) { 162 PAGE_END(header_.e_phoff + (phdr_num_ * sizeof(ELF::Phdr))); 170 error->Format("Phdr mmap failed: %s", strerror(errno)); 175 phdr_table_ = reinterpret_cast<ELF::Phdr*>( 219 const ELF::Phdr* phdr_limit = phdr_table_ + phdr_num_; 222 for (const ELF::Phdr* phdr = phdr_table_; phdr < phdr_limit; ++phdr) { 223 if (phdr->p_type == PT_PHDR) 273 const ELF::Phdr* phdr = &phdr_table_[i]; local [all...] |
crazy_linker_elf_view.cpp | 12 const ELF::Phdr* phdr, 17 load_size_ = phdr_table_get_load_size(phdr, phdr_count, &min_vaddr, NULL); 26 phdr_table_get_dynamic_section(phdr, 38 // This is different from |phdr|..|phdr + phdr_count| which can actually 40 const ELF::Phdr* phdr0 = NULL; 44 const ELF::Phdr* entry = &phdr[n]; 56 const ELF::Phdr* entry = &phdr[n] [all...] |
/external/elfutils/0.153/libelf/ |
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 [all...] |
elf32_getphdr.c | 69 ElfW2(LIBELFBITS,Phdr) * 73 ElfW2(LIBELFBITS,Phdr) *result; 78 result = elf->state.ELFW(elf,LIBELFBITS).phdr; 106 size_t size = phnum * sizeof (ElfW2(LIBELFBITS,Phdr)); 123 & (__alignof__ (ElfW2(LIBELFBITS,Phdr)) - 1)) == 0)) 125 elf->state.ELFW(elf,LIBELFBITS).phdr = file_phdr; 128 ElfW2(LIBELFBITS,Phdr) *notcvt; 129 ElfW2(LIBELFBITS,Phdr) *phdr; 133 phdr = elf->state.ELFW(elf,LIBELFBITS).phdr [all...] |
gelf_update_phdr.c | 79 Elf32_Phdr *phdr = elf->state.elf32.phdr; local 95 if (phdr == NULL) 97 phdr = __elf32_getphdr_wrlock (elf); 98 if (phdr == NULL) 115 phdr += ndx; 118 phdr->name = src->name 130 Elf64_Phdr *phdr = elf->state.elf64.phdr; local 132 if (phdr == NULL [all...] |
elf32_newphdr.c | 66 ElfW2(LIBELFBITS,Phdr) * 71 ElfW2(LIBELFBITS,Phdr) *result; 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; 125 sizeof (ElfW2(LIBELFBITS,Phdr)); 136 || elf->state.ELFW(elf,LIBELFBITS).phdr == NULL) 140 result = (ElfW2(LIBELFBITS,Phdr) *) 141 realloc (elf->state.ELFW(elf,LIBELFBITS).phdr, 142 count * sizeof (ElfW2(LIBELFBITS,Phdr))); [all...] |
/bionic/linker/ |
linker_phdr.cpp | 56 We will ignore the p_paddr and p_align fields of ElfW(Phdr) for now. 217 if (phdr_num_ < 1 || phdr_num_ > 65536/sizeof(ElfW(Phdr))) { 223 ElfW(Addr) page_max = PAGE_END(header_.e_phoff + (phdr_num_ * sizeof(ElfW(Phdr)))); 230 DL_ERR("\"%s\" phdr mmap failed: %s", name_, strerror(errno)); 235 phdr_table_ = reinterpret_cast<ElfW(Phdr)*>(reinterpret_cast<char*>(mmap_result) + page_offset); 249 size_t phdr_table_get_load_size(const ElfW(Phdr)* phdr_table, size_t phdr_count, 257 const ElfW(Phdr)* phdr = &phdr_table[i]; 259 if (phdr->p_type != PT_LOAD) { 264 if (phdr->p_vaddr < min_vaddr) [all...] |
/bionic/libc/bionic/ |
libc_init_static.cpp | 72 ElfW(Phdr)* phdr_start = reinterpret_cast<ElfW(Phdr)*>(getauxval(AT_PHDR)); 75 for (ElfW(Phdr)* phdr = phdr_start; phdr < (phdr_start + phdr_ct); phdr++) { 76 if (phdr->p_type != PT_GNU_RELRO) { 80 ElfW(Addr) seg_page_start = PAGE_START(phdr->p_vaddr); 81 ElfW(Addr) seg_page_end = PAGE_END(phdr->p_vaddr + phdr->p_memsz) [all...] |
/external/linux-tools-perf/perf-3.12.0/tools/perf/util/ |
symbol-minimal.c | 109 Elf32_Phdr *phdr; local 129 for (i = 0, phdr = buf; i < ehdr.e_phnum; i++, phdr++) { 133 phdr->p_type = bswap_32(phdr->p_type); 134 phdr->p_offset = bswap_32(phdr->p_offset); 135 phdr->p_filesz = bswap_32(phdr->p_filesz); 138 if (phdr->p_type != PT_NOTE 158 Elf64_Phdr *phdr; local [all...] |
/external/elfutils/0.153/libdwfl/ |
core-file.c | 157 GElf_Phdr *phdr = gelf_getphdr (elf, ndx, &phdr_mem); local 158 if (unlikely (phdr == NULL)) 163 switch (phdr->p_type) 166 result = dwfl_report_segment (dwfl, ndx, phdr, 0, NULL); 172 *notes = *phdr; 270 GElf_Phdr phdr; local 273 if (unlikely (gelf_getphdr (elf, ndx++, &phdr) == NULL)) 275 while (phdr.p_type != PT_LOAD 276 || ((phdr.p_vaddr + phdr.p_memsz + align - 1) & -align) <= vaddr) [all...] |
/external/libunwind/src/dwarf/ |
Gfind_unwind_table.c | 43 Elf_W(Phdr) *phdr, *ptxt = NULL, *peh_hdr = NULL, *pdyn = NULL; 53 const Elf_W(Phdr) *parm_exidx = NULL; 66 phdr = (Elf_W(Phdr) *) ((char *) ei->image + ehdr->e_phoff); 71 switch (phdr[i].p_type) 74 if (phdr[i].p_vaddr < start_ip) 75 start_ip = phdr[i].p_vaddr; 77 if (phdr[i].p_vaddr + phdr[i].p_memsz > end_ip [all...] |
/external/qemu/include/hw/ |
elf_ops.h | 18 static void glue(bswap_phdr, SZ)(struct elf_phdr *phdr) 20 bswap32s(&phdr->p_type); /* Segment type */ 21 bswapSZs(&phdr->p_offset); /* Segment file offset */ 22 bswapSZs(&phdr->p_vaddr); /* Segment virtual address */ 23 bswapSZs(&phdr->p_paddr); /* Segment physical address */ 24 bswapSZs(&phdr->p_filesz); /* Segment size in file */ 25 bswapSZs(&phdr->p_memsz); /* Segment size in memory */ 26 bswap32s(&phdr->p_flags); /* Segment flags */ 27 bswapSZs(&phdr->p_align); /* Segment alignment */ 185 struct elf_phdr *phdr = NULL, *ph local [all...] |
/external/compiler-rt/lib/lsan/ |
lsan_common_linux.cc | 59 const ElfW(Phdr) *phdr = &(info->dlpi_phdr[j]); 62 if (!(phdr->p_flags & PF_W) || (phdr->p_type != PT_LOAD) || 63 (phdr->p_memsz == 0)) 65 uptr begin = info->dlpi_addr + phdr->p_vaddr; 66 uptr end = begin + phdr->p_memsz;
|
/external/elfutils/0.153/libdw/ |
dwarf_getcfi_elf.c | 147 getcfi_gnu_eh_frame (Elf *elf, const GElf_Ehdr *ehdr, const GElf_Phdr *phdr) 149 if (unlikely (phdr->p_filesz < 4)) 152 Elf_Data *data = elf_getdata_rawchunk (elf, phdr->p_offset, phdr->p_filesz, 158 /* XXX might be read error or corrupt phdr */ 166 const uint8_t *search_table = parse_eh_frame_hdr (data->d_buf, phdr->p_filesz, 167 phdr->p_vaddr, ehdr, 174 Dwarf_Off eh_frame_offset = eh_frame_ptr - phdr->p_vaddr + phdr->p_offset; 199 cfi->search_table_vaddr = phdr->p_vaddr 218 GElf_Phdr *phdr = gelf_getphdr (elf, i, &phdr_mem); local [all...] |
/external/chromium_org/components/nacl/loader/nonsfi/ |
elf_loader.cc | 104 // Converts the pflags (in phdr) to mmap's prot flags. 111 // Converts the pflags (in phdr) to NaCl ABI's prot flags. 119 ElfW(Addr) GetLoadSize(const ElfW(Phdr)* phdrs, int phnum) { 124 const ElfW(Phdr)& phdr = phdrs[i]; 125 if (phdr.p_type != PT_LOAD) { 130 begin = std::min(begin, phdr.p_vaddr); 131 end = std::max(end, phdr.p_vaddr + phdr.p_memsz); 144 NaClErrorCode ReserveMemory(const ElfW(Phdr)* phdrs [all...] |
/external/libunwind/src/ia64/ |
Gfind_unwind_table.c | 99 Elf64_Phdr *phdr, *ptxt = NULL, *punw = NULL, *pdyn = NULL; local 107 phdr = (Elf64_Phdr *) ((char *) edi->ei.image + ehdr->e_phoff); 111 switch (phdr[i].p_type) 114 if (phdr[i].p_offset == mapoff) 115 ptxt = phdr + i; 119 punw = phdr + i; 123 pdyn = phdr + i;
|
/external/wpa_supplicant_8/src/eap_peer/ |
ikev2.c | 843 struct ikev2_payload_hdr *phdr; local 851 phdr = wpabuf_put(msg, sizeof(*phdr)); 852 phdr->next_payload = next_payload; 853 phdr->flags = 0; 892 plen = (u8 *) wpabuf_put(msg, 0) - (u8 *) phdr; 893 WPA_PUT_BE16(phdr->payload_length, plen); 902 struct ikev2_payload_hdr *phdr; local 915 phdr = wpabuf_put(msg, sizeof(*phdr)); 938 struct ikev2_payload_hdr *phdr; local 957 struct ikev2_payload_hdr *phdr; local 983 struct ikev2_payload_hdr *phdr; local 1023 struct ikev2_payload_hdr *phdr; local [all...] |