Lines Matching refs:phdr
141 GElf_Phdr phdr; in get_txtorigin() local
150 if (gelf_getphdr(elf, ndx, &phdr) == NULL) in get_txtorigin()
153 if ((phdr.p_type == PT_LOAD) && !(phdr.p_flags & PF_W)) { in get_txtorigin()
154 if (first_load_seg || phdr.p_vaddr < txt_origin) in get_txtorigin()
155 txt_origin = phdr.p_vaddr; in get_txtorigin()
241 GElf_Phdr phdr; in get_textseg() local
249 if (gelf_getphdr(elf, i, &phdr) == NULL) in get_textseg()
252 if (!(phdr.p_flags & PF_W) && (phdr.p_filesz > textsize)) { in get_textseg()
266 chk = (size_t)phdr.p_vaddr + (size_t)phdr.p_filesz; in get_textseg()
267 if (phdr.p_vaddr + phdr.p_filesz != (GElf_Xword)chk) in get_textseg()
270 textbegin = (size_t)phdr.p_vaddr; in get_textseg()
271 textsize = (size_t)phdr.p_filesz; in get_textseg()
275 if (lseek(fd, (off_t)phdr.p_offset, SEEK_SET) != in get_textseg()
276 (off_t)phdr.p_offset) in get_textseg()