Lines Matching defs:elf
60 * same directory as the elf file being processed.
85 delete_comment(Elf *elf, int fd, const char *file)
96 if (gelf_getehdr(elf, &ehdr) == NULL) {
102 if (elf_getshdrnum(elf, &shnum) == -1) {
108 if (elf_getshdrstrndx(elf, &shstrndx) == -1) {
114 if (elf_getphdrnum(elf, &phnum) == -1) {
126 while ((scn = elf_nextscn(elf, scn)) != NULL) {
140 if (strcmp(CommentStr, elf_strptr(elf, shstrndx,
181 if (gelf_newehdr(telf, gelf_getclass(elf)) == NULL) {
196 while ((scn = elf_nextscn(elf, scn)) != NULL) {
307 if (gelf_getphdr(elf, ndx, &phdr) == NULL ||
360 * Initialize the elf library, must be called before elf_begin()
371 Elf *elf;
385 if ((elf = elf_begin(fd, ELF_C_READ, 0)) == NULL) {
393 * Determine what kind of elf file this is:
395 if (elf_kind(elf) != ELF_K_ELF) {
401 "elf_kind == %d\n", elf_fname, elf_kind(elf));
403 delete_comment(elf, fd, elf_fname);
405 (void) elf_end(elf);