Home | History | Annotate | Download | only in src

Lines Matching refs:phdr

850 		      GElf_Phdr *phdr = NULL;
855 phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem);
856 if (phdr != NULL && phdr->p_type == PT_TLS)
867 else if (phdr == NULL)
876 < destshdr->sh_offset - phdr->p_offset)
882 > (destshdr->sh_offset - phdr->p_offset
889 > (destshdr->sh_offset - phdr->p_offset
1017 GElf_Phdr *phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem);
1019 if (phdr != NULL && phdr->p_type == PT_DYNAMIC)
1021 if (sym->st_value != phdr->p_vaddr)
1026 (uint64_t) phdr->p_vaddr);
1028 if (!gnuld && sym->st_size != phdr->p_memsz)
1033 (uint64_t) phdr->p_memsz);
1287 GElf_Phdr *phdr = gelf_getphdr (ebl->elf, i, &phdr_mem);
1288 if (phdr == NULL)
1291 if (phdr->p_type == PT_LOAD)
1294 newp->from = phdr->p_vaddr;
1295 newp->to = phdr->p_vaddr + phdr->p_memsz;
1296 newp->read_only = (phdr->p_flags & PF_W) == 0;
1300 else if (phdr->p_type == PT_DYNAMIC)
1302 Elf_Scn *dynscn = gelf_offscn (ebl->elf, phdr->p_offset);
1771 GElf_Phdr *phdr = gelf_getphdr (ebl->elf, n, &phdr_mem);
1772 if (phdr != NULL && phdr->p_type == PT_LOAD
1773 && phdr->p_vaddr <= dyn->d_un.d_ptr
1774 && phdr->p_vaddr + phdr->p_memsz > dyn->d_un.d_ptr)
3008 GElf_Phdr *phdr = NULL;
3012 if ((phdr = gelf_getphdr (elf, i, &phdr_mem)) != NULL
3013 && phdr->p_type == PT_DYNAMIC)
3018 assert (phdr != NULL);
3019 Elf_Scn *scn = gelf_offscn (elf, phdr->p_offset);
3996 GElf_Phdr *phdr;
3999 if ((phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem)) != NULL
4000 && ((phdr->p_type == PT_LOAD
4002 || (phdr->p_type == PT_TLS
4004 && phdr->p_offset <= shdr->sh_offset
4005 && ((shdr->sh_offset - phdr->p_offset <= phdr->p_filesz
4006 && (shdr->sh_offset - phdr->p_offset < phdr->p_filesz
4008 || (shdr->sh_offset - phdr->p_offset < phdr->p_memsz
4012 if (phdr->p_offset + phdr->p_memsz
4020 if (shdr->sh_offset < phdr->p_offset + phdr->p_filesz
4058 const GElf_Off end = phdr->p_offset + phdr->p_filesz;
4071 if ((phdr->p_flags & PF_X) == 0)
4081 && (phdr->p_flags & PF_W) == 0)
4186 GElf_Phdr *phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem);
4187 if (phdr != NULL && (phdr->p_type == PT_LOAD || phdr->p_type == PT_TLS))
4189 if ((phdr->p_flags & PF_X) != 0
4195 if ((phdr->p_flags & PF_W) != 0
4285 phdr[%d]: unknown core file note type %" PRIu32 " at offset %" PRIu64 "\n"),
4312 phdr[%d]: unknown object file note type %" PRIu32 " at offset %zu\n"),
4328 check_note (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Phdr *phdr, int cnt)
4333 phdr[%d]: no note entries defined for the type of file\n"),
4340 if (phdr->p_filesz == 0)
4345 phdr->p_offset, phdr->p_filesz,
4348 notes_size = check_note_data (ebl, ehdr, data, 0, cnt, phdr->p_offset);
4351 ERROR (gettext ("phdr[%d]: cannot get content of note section: %s\n"),
4353 else if (notes_size != phdr->p_filesz)
4354 ERROR (gettext ("phdr[%d]: extra %" PRIu64 " bytes after last note\n"),
4355 cnt, phdr->p_filesz - notes_size);
4413 GElf_Phdr *phdr;
4415 phdr = gelf_getphdr (ebl->elf, cnt, &phdr_mem);
4416 if (phdr == NULL)
4423 if (phdr->p_type >= PT_NUM && phdr->p_type != PT_GNU_EH_FRAME
4424 && phdr->p_type != PT_GNU_STACK && phdr->p_type != PT_GNU_RELRO
4426 && ebl_segment_type_name (ebl, phdr->p_type, NULL, 0) == NULL)
4429 cnt, (uint64_t) phdr->p_type);
4431 if (phdr->p_type == PT_LOAD)
4433 else if (phdr->p_type == PT_INTERP)
4443 else if (phdr->p_type == PT_TLS)
4448 else if (phdr->p_type == PT_NOTE)
4449 check_note (ebl, ehdr, phdr, cnt);
4450 else if (phdr->p_type == PT_DYNAMIC)
4466 if (phdr->p_offset != shdr->sh_offset)
4469 if (phdr->p_memsz != shdr->sh_size)
4477 else if (phdr->p_type == PT_GNU_RELRO)
4496 && phdr->p_vaddr >= phdr2->p_vaddr
4497 && (phdr->p_vaddr + phdr->p_memsz
4506 if (phdr->p_vaddr == phdr2->p_vaddr
4507 && (phdr->p_vaddr + phdr->p_memsz
4511 != (phdr->p_flags & ~PF_W))
4518 if ((phdr->p_flags & ~phdr2->p_flags) != 0)
4532 else if (phdr->p_type == PT_PHDR)
4544 && phdr->p_vaddr >= phdr2->p_vaddr
4545 && (phdr->p_vaddr + phdr->p_memsz
4552 %s segment not contained in a loaded segment\n"), "PHDR");
4556 if (phdr->p_offset != ehdr->e_phoff)
4558 program header offset in ELF header and PHDR entry do not match"));
4560 else if (phdr->p_type == PT_GNU_EH_FRAME)
4581 if (phdr->p_offset != shdr->sh_offset)
4584 if (phdr->p_memsz != shdr->sh_size)
4605 if ((phdr->p_flags & PF_R) == 0)
4612 if ((phdr->p_flags & PF_W) != 0)
4620 if ((phdr->p_flags & PF_X) != 0)
4633 if (phdr->p_filesz > phdr->p_memsz
4634 && (phdr->p_memsz != 0 || phdr->p_type != PT_NOTE))
4639 if (phdr->p_align > 1)
4641 if (!powerof2 (phdr->p_align))
4644 else if ((phdr->p_vaddr - phdr->p_offset) % phdr->p_align != 0)