Lines Matching refs:elf
44 Elf *elf;
58 elf = elf_begin (fd, ELF_C_WRITE, NULL);
59 if (elf == NULL)
61 printf ("cannot create ELF descriptor: %s\n", elf_errmsg (-1));
65 /* Create an ELF header. */
66 ehdr = elf32_newehdr (elf);
69 printf ("cannot create ELF header: %s\n", elf_errmsg (-1));
73 /* Print the ELF header values. */
95 elf_flagehdr (elf, ELF_C_SET, ELF_F_DIRTY);
98 phdr = elf32_newphdr (elf, 1);
106 elf_flagphdr (elf, ELF_C_SET, ELF_F_DIRTY);
109 if (elf_update (elf, ELF_C_NULL) < 0)
115 ehdr = elf32_getehdr (elf);
127 if (elf_update (elf, ELF_C_WRITE) < 0)
133 /* Print the ELF header values. */
148 if (elf_end (elf) != 0)