Lines Matching refs:phdr
501 static void loads_init(Elf64_Phdr *phdr, u64 loads_offset) in loads_init() argument
507 phdr->p_filesz = end - start; in loads_init()
508 phdr->p_type = PT_LOAD; in loads_init()
509 phdr->p_offset = start; in loads_init()
510 phdr->p_vaddr = start; in loads_init()
511 phdr->p_paddr = start; in loads_init()
512 phdr->p_memsz = end - start; in loads_init()
513 phdr->p_flags = PF_R | PF_W | PF_X; in loads_init()
514 phdr->p_align = PAGE_SIZE; in loads_init()
515 phdr++; in loads_init()
522 static void *notes_init(Elf64_Phdr *phdr, void *ptr, u64 notes_offset) in notes_init() argument
536 memset(phdr, 0, sizeof(*phdr)); in notes_init()
537 phdr->p_type = PT_NOTE; in notes_init()
538 phdr->p_offset = notes_offset; in notes_init()
539 phdr->p_filesz = (unsigned long) PTR_SUB(ptr, ptr_start); in notes_init()
540 phdr->p_memsz = phdr->p_filesz; in notes_init()