Lines Matching refs:phdr
143 GElf_Phdr phdr; in get_txtorigin() local
152 if (gelf_getphdr(elf, ndx, &phdr) == NULL) in get_txtorigin()
155 if ((phdr.p_type == PT_LOAD) && !(phdr.p_flags & PF_W)) { in get_txtorigin()
156 if (first_load_seg || phdr.p_vaddr < txt_origin) in get_txtorigin()
157 txt_origin = phdr.p_vaddr; in get_txtorigin()
243 GElf_Phdr phdr; in get_textseg() local
251 if (gelf_getphdr(elf, i, &phdr) == NULL) in get_textseg()
254 if (!(phdr.p_flags & PF_W) && (phdr.p_filesz > textsize)) { in get_textseg()
268 chk = (size_t)phdr.p_vaddr + (size_t)phdr.p_filesz; in get_textseg()
269 if (phdr.p_vaddr + phdr.p_filesz != (GElf_Xword)chk) in get_textseg()
272 textbegin = (size_t)phdr.p_vaddr; in get_textseg()
273 textsize = (size_t)phdr.p_filesz; in get_textseg()
277 if (lseek(fd, (off_t)phdr.p_offset, SEEK_SET) != in get_textseg()
278 (off_t)phdr.p_offset) in get_textseg()