Lines Matching defs:phdr

498 	GElf_Phdr *phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem);
499 if (phdr == NULL)
870 GElf_Phdr *phdr = NULL;
875 phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem);
876 if (phdr != NULL && phdr->p_type == PT_TLS)
887 else if (phdr == NULL)
896 < destshdr->sh_offset - phdr->p_offset)
902 > (destshdr->sh_offset - phdr->p_offset
909 > (destshdr->sh_offset - phdr->p_offset
1037 GElf_Phdr *phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem);
1039 if (phdr != NULL && phdr->p_type == PT_DYNAMIC)
1041 if (sym->st_value != phdr->p_vaddr)
1046 (uint64_t) phdr->p_vaddr);
1048 if (!gnuld && sym->st_size != phdr->p_memsz)
1053 (uint64_t) phdr->p_memsz);
1307 GElf_Phdr *phdr = gelf_getphdr (ebl->elf, i, &phdr_mem);
1308 if (phdr == NULL)
1311 if (phdr->p_type == PT_LOAD)
1314 newp->from = phdr->p_vaddr;
1315 newp->to = phdr->p_vaddr + phdr->p_memsz;
1316 newp->read_only = (phdr->p_flags & PF_W) == 0;
1320 else if (phdr->p_type == PT_DYNAMIC)
1322 Elf_Scn *dynscn = gelf_offscn (ebl->elf, phdr->p_offset);
1791 GElf_Phdr *phdr = gelf_getphdr (ebl->elf, n, &phdr_mem);
1792 if (phdr != NULL && phdr->p_type == PT_LOAD
1793 && phdr->p_vaddr <= dyn->d_un.d_ptr
1794 && phdr->p_vaddr + phdr->p_memsz > dyn->d_un.d_ptr)
3050 GElf_Phdr *phdr = NULL;
3054 if ((phdr = gelf_getphdr (elf, i, &phdr_mem)) != NULL
3055 && phdr->p_type == PT_DYNAMIC)
3060 assert (phdr != NULL);
3061 Elf_Scn *scn = gelf_offscn (elf, phdr->p_offset);
4055 GElf_Phdr *phdr;
4058 if ((phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem)) != NULL
4059 && ((phdr->p_type == PT_LOAD
4061 || (phdr->p_type == PT_TLS
4063 && phdr->p_offset <= shdr->sh_offset
4064 && ((shdr->sh_offset - phdr->p_offset <= phdr->p_filesz
4065 && (shdr->sh_offset - phdr->p_offset < phdr->p_filesz
4067 || (shdr->sh_offset - phdr->p_offset < phdr->p_memsz
4071 if (phdr->p_offset + phdr->p_memsz
4079 if (shdr->sh_offset < phdr->p_offset + phdr->p_filesz
4117 const GElf_Off end = phdr->p_offset + phdr->p_filesz;
4130 if ((phdr->p_flags & PF_X) == 0)
4140 && (phdr->p_flags & PF_W) == 0)
4245 GElf_Phdr *phdr = gelf_getphdr (ebl->elf, pcnt, &phdr_mem);
4246 if (phdr != NULL && (phdr->p_type == PT_LOAD || phdr->p_type == PT_TLS))
4248 if ((phdr->p_flags & PF_X) != 0
4254 if ((phdr->p_flags & PF_W) != 0
4344 phdr[%d]: unknown core file note type %" PRIu32 " at offset %" PRIu64 "\n"),
4404 phdr[%d]: unknown object file note type %" PRIu32 " with owner name '%s' at offset %zu\n"),
4423 check_note (Ebl *ebl, GElf_Ehdr *ehdr, GElf_Phdr *phdr, int cnt)
4428 phdr[%d]: no note entries defined for the type of file\n"),
4435 if (phdr->p_filesz == 0)
4440 phdr->p_offset, phdr->p_filesz,
4441 (phdr->p_align == 8
4444 notes_size = check_note_data (ebl, ehdr, data, 0, cnt, phdr->p_offset);
4447 ERROR (_("phdr[%d]: cannot get content of note section: %s\n"),
4449 else if (notes_size != phdr->p_filesz)
4450 ERROR (_("phdr[%d]: extra %" PRIu64 " bytes after last note\n"),
4451 cnt, phdr->p_filesz - notes_size);
4509 GElf_Phdr *phdr;
4511 phdr = gelf_getphdr (ebl->elf, cnt, &phdr_mem);
4512 if (phdr == NULL)
4519 if (phdr->p_type >= PT_NUM && phdr->p_type != PT_GNU_EH_FRAME
4520 && phdr->p_type != PT_GNU_STACK && phdr->p_type != PT_GNU_RELRO
4521 && phdr->p_type != PT_GNU_PROPERTY
4523 && ebl_segment_type_name (ebl, phdr->p_type, NULL, 0) == NULL)
4526 cnt, (uint64_t) phdr->p_type);
4528 if (phdr->p_type == PT_LOAD)
4530 else if (phdr->p_type == PT_INTERP)
4540 else if (phdr->p_type == PT_TLS)
4545 else if (phdr->p_type == PT_NOTE)
4546 check_note (ebl, ehdr, phdr, cnt);
4547 else if (phdr->p_type == PT_DYNAMIC)
4563 if (phdr->p_offset != shdr->sh_offset)
4566 if (phdr->p_memsz != shdr->sh_size)
4574 else if (phdr->p_type == PT_GNU_RELRO)
4593 && phdr->p_vaddr >= phdr2->p_vaddr
4594 && (phdr->p_vaddr + phdr->p_memsz
4603 if (phdr->p_vaddr == phdr2->p_vaddr
4604 && (phdr->p_vaddr + phdr->p_memsz
4608 != (phdr->p_flags & ~PF_W))
4615 if ((phdr->p_flags & ~phdr2->p_flags) != 0)
4629 else if (phdr->p_type == PT_PHDR)
4641 && phdr->p_vaddr >= phdr2->p_vaddr
4642 && (phdr->p_vaddr + phdr->p_memsz
4653 if (phdr->p_offset != ehdr->e_phoff)
4657 else if (phdr->p_type == PT_GNU_EH_FRAME)
4680 if (phdr->p_offset != shdr->sh_offset)
4683 if (phdr->p_memsz != shdr->sh_size)
4704 if ((phdr->p_flags & PF_R) == 0)
4711 if ((phdr->p_flags & PF_W) != 0)
4719 if ((phdr->p_flags & PF_X) != 0)
4732 if (phdr->p_filesz > phdr->p_memsz
4733 && (phdr->p_memsz != 0
4734 || (phdr->p_type != PT_NOTE
4736 && phdr->p_type == PT_RISCV_ATTRIBUTES))))
4741 if (phdr->p_align > 1)
4743 if (!powerof2 (phdr->p_align))
4746 else if ((phdr->p_vaddr - phdr->p_offset) % phdr->p_align != 0)