Lines Matching refs:phdr
834 Elf64_Phdr phdr; in merge_note_headers_elf64() local
857 phdr.p_type = PT_NOTE; in merge_note_headers_elf64()
858 phdr.p_flags = 0; in merge_note_headers_elf64()
861 phdr.p_offset = roundup(note_off, PAGE_SIZE); in merge_note_headers_elf64()
862 phdr.p_vaddr = phdr.p_paddr = 0; in merge_note_headers_elf64()
863 phdr.p_filesz = phdr.p_memsz = phdr_sz; in merge_note_headers_elf64()
864 phdr.p_align = 0; in merge_note_headers_elf64()
868 memcpy(tmp, &phdr, sizeof(phdr)); in merge_note_headers_elf64()
869 tmp += sizeof(phdr); in merge_note_headers_elf64()
884 elfnotes_orig_sz = phdr.p_memsz; in merge_note_headers_elf64()
1025 Elf32_Phdr phdr; in merge_note_headers_elf32() local
1048 phdr.p_type = PT_NOTE; in merge_note_headers_elf32()
1049 phdr.p_flags = 0; in merge_note_headers_elf32()
1052 phdr.p_offset = roundup(note_off, PAGE_SIZE); in merge_note_headers_elf32()
1053 phdr.p_vaddr = phdr.p_paddr = 0; in merge_note_headers_elf32()
1054 phdr.p_filesz = phdr.p_memsz = phdr_sz; in merge_note_headers_elf32()
1055 phdr.p_align = 0; in merge_note_headers_elf32()
1059 memcpy(tmp, &phdr, sizeof(phdr)); in merge_note_headers_elf32()
1060 tmp += sizeof(phdr); in merge_note_headers_elf32()
1075 elfnotes_orig_sz = phdr.p_memsz; in merge_note_headers_elf32()
1383 Elf64_Phdr *phdr = (Elf64_Phdr *)(elfptr + sizeof(Elf64_Ehdr)); in vmcoredd_update_program_headers() local
1386 for (i = 0; i < ehdr->e_phnum; i++, phdr++) { in vmcoredd_update_program_headers()
1387 if (phdr->p_type == PT_NOTE) { in vmcoredd_update_program_headers()
1389 phdr->p_memsz = elfnotes_orig_sz + vmcoreddsz; in vmcoredd_update_program_headers()
1390 phdr->p_filesz = phdr->p_memsz; in vmcoredd_update_program_headers()
1394 start = rounddown(phdr->p_offset, PAGE_SIZE); in vmcoredd_update_program_headers()
1395 end = roundup(phdr->p_offset + phdr->p_memsz, in vmcoredd_update_program_headers()
1398 phdr->p_offset = vmcore_off + (phdr->p_offset - start); in vmcoredd_update_program_headers()
1403 Elf32_Phdr *phdr = (Elf32_Phdr *)(elfptr + sizeof(Elf32_Ehdr)); in vmcoredd_update_program_headers() local
1406 for (i = 0; i < ehdr->e_phnum; i++, phdr++) { in vmcoredd_update_program_headers()
1407 if (phdr->p_type == PT_NOTE) { in vmcoredd_update_program_headers()
1409 phdr->p_memsz = elfnotes_orig_sz + vmcoreddsz; in vmcoredd_update_program_headers()
1410 phdr->p_filesz = phdr->p_memsz; in vmcoredd_update_program_headers()
1414 start = rounddown(phdr->p_offset, PAGE_SIZE); in vmcoredd_update_program_headers()
1415 end = roundup(phdr->p_offset + phdr->p_memsz, in vmcoredd_update_program_headers()
1418 phdr->p_offset = vmcore_off + (phdr->p_offset - start); in vmcoredd_update_program_headers()