Lines Matching refs:phdr
560 static void loads_init(Elf64_Phdr *phdr, u64 loads_offset) in loads_init() argument
566 phdr->p_filesz = end - start; in loads_init()
567 phdr->p_type = PT_LOAD; in loads_init()
568 phdr->p_offset = start; in loads_init()
569 phdr->p_vaddr = start; in loads_init()
570 phdr->p_paddr = start; in loads_init()
571 phdr->p_memsz = end - start; in loads_init()
572 phdr->p_flags = PF_R | PF_W | PF_X; in loads_init()
573 phdr->p_align = PAGE_SIZE; in loads_init()
574 phdr++; in loads_init()
581 static void *notes_init(Elf64_Phdr *phdr, void *ptr, u64 notes_offset) in notes_init() argument
595 memset(phdr, 0, sizeof(*phdr)); in notes_init()
596 phdr->p_type = PT_NOTE; in notes_init()
597 phdr->p_offset = notes_offset; in notes_init()
598 phdr->p_filesz = (unsigned long) PTR_SUB(ptr, ptr_start); in notes_init()
599 phdr->p_memsz = phdr->p_filesz; in notes_init()