Lines Matching refs:LIBELFBITS
28 #ifndef LIBELFBITS
29 # define LIBELFBITS 32
33 ElfW2(LIBELFBITS,Phdr) *
34 elfw2(LIBELFBITS,newphdr) (elf, count)
38 ElfW2(LIBELFBITS,Phdr) *result;
52 elf->class = ELFW(ELFCLASS,LIBELFBITS);
53 else if (unlikely (elf->class != ELFW(ELFCLASS,LIBELFBITS)))
60 if (unlikely (elf->state.ELFW(elf,LIBELFBITS).ehdr == NULL))
71 if (elf->state.ELFW(elf,LIBELFBITS).phdr != NULL)
73 if (elf->state.ELFW(elf,LIBELFBITS).phdr_flags & ELF_F_MALLOCED)
74 free (elf->state.ELFW(elf,LIBELFBITS).phdr);
77 elf->state.ELFW(elf,LIBELFBITS).phdr = NULL;
79 elf->state.ELFW(elf,LIBELFBITS).ehdr->e_phnum = 0;
81 elf->state.ELFW(elf,LIBELFBITS).ehdr->e_phentsize =
82 sizeof (ElfW2(LIBELFBITS,Phdr));
84 elf->state.ELFW(elf,LIBELFBITS).phdr_flags |= ELF_F_DIRTY;
91 else if (elf->state.ELFW(elf,LIBELFBITS).ehdr->e_phnum != count
92 || elf->state.ELFW(elf,LIBELFBITS).phdr == NULL)
96 result = (ElfW2(LIBELFBITS,Phdr) *)
97 realloc (elf->state.ELFW(elf,LIBELFBITS).phdr,
98 count * sizeof (ElfW2(LIBELFBITS,Phdr)));
104 elf->state.ELFW(elf,LIBELFBITS).phdr = result;
106 memset (result, '\0', count * sizeof (ElfW2(LIBELFBITS,Phdr)));
108 elf->state.ELFW(elf,LIBELFBITS).ehdr->e_phnum = count;
110 elf->state.ELFW(elf,LIBELFBITS).ehdr->e_phentsize =
111 elf_typesize (LIBELFBITS, ELF_T_PHDR, 1);
114 elf->state.ELFW(elf,LIBELFBITS).phdr_flags |=
124 assert (elf->state.ELFW(elf,LIBELFBITS).ehdr->e_phentsize
125 == elf_typesize (LIBELFBITS, ELF_T_PHDR, 1));
128 elf->state.ELFW(elf,LIBELFBITS).phdr_flags |= ELF_F_DIRTY;
130 result = elf->state.ELFW(elf,LIBELFBITS).phdr;
138 INTDEF(elfw2(LIBELFBITS,newphdr))