Lines Matching refs:phdr
292 handle_core_note(Elf *elf, GElf_Ehdr *elfhdr, GElf_Phdr *phdr, in handle_core_note() argument
304 if (elf == NULL || elfhdr == NULL || phdr == NULL) in handle_core_note()
308 offset = phdr->p_offset; in handle_core_note()
309 if (offset >= max_size || phdr->p_filesz > max_size - offset) { in handle_core_note()
313 segment_end = phdr->p_offset + phdr->p_filesz; in handle_core_note()
480 handle_phdr(Elf *elf, GElf_Ehdr *elfhdr, GElf_Phdr *phdr, in handle_phdr() argument
487 if (elf == NULL || elfhdr == NULL || phdr == NULL) in handle_phdr()
490 split = (phdr->p_memsz > 0) && (phdr->p_filesz > 0) && in handle_phdr()
491 (phdr->p_memsz > phdr->p_filesz); in handle_phdr()
498 tbl_print_num(phdr->p_filesz, radix, 1); in handle_phdr()
499 tbl_print_num(phdr->p_vaddr, radix, 2); in handle_phdr()
500 text_size_total += phdr->p_filesz; in handle_phdr()
502 size = phdr->p_memsz - phdr->p_filesz; in handle_phdr()
503 addr = phdr->p_vaddr + phdr->p_filesz; in handle_phdr()
506 text_size_total += phdr->p_memsz - phdr->p_filesz; in handle_phdr()
513 if (phdr->p_type != PT_LOAD) in handle_phdr()
515 if ((phdr->p_flags & PF_W) && !(phdr->p_flags & PF_X)) { in handle_phdr()
516 data_size += phdr->p_filesz; in handle_phdr()
518 data_size += phdr->p_memsz - phdr->p_filesz; in handle_phdr()
520 text_size += phdr->p_filesz; in handle_phdr()
522 text_size += phdr->p_memsz - phdr->p_filesz; in handle_phdr()
533 GElf_Phdr phdr; in handle_core() local
550 if (gelf_getphdr(elf, i, &phdr) != NULL) { in handle_core()
551 if (phdr.p_type == PT_NOTE) { in handle_core()
552 handle_phdr(elf, elfhdr, &phdr, i, "note"); in handle_core()
553 handle_core_note(elf, elfhdr, &phdr, in handle_core()
556 switch(phdr.p_type) { in handle_core()
584 handle_phdr(elf, elfhdr, &phdr, i, seg_name); in handle_core()