Lines Matching refs:LIBELFBITS
65 #ifndef LIBELFBITS
66 # define LIBELFBITS 32
72 ELFW(default_ehdr,LIBELFBITS) (Elf *elf, ElfW2(LIBELFBITS,Ehdr) *ehdr,
79 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY;
83 update_if_changed (ehdr->e_ident[EI_CLASS], ELFW(ELFCLASS,LIBELFBITS),
84 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags);
91 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY;
106 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags);
118 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags);
122 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags);
124 if (unlikely (ehdr->e_ehsize != elf_typesize (LIBELFBITS, ELF_T_EHDR, 1)))
126 ehdr->e_ehsize = elf_typesize (LIBELFBITS, ELF_T_EHDR, 1);
127 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY;
136 __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum)
138 ElfW2(LIBELFBITS,Ehdr) *ehdr;
142 ehdr = __elfw2(LIBELFBITS,getehdr_wrlock) (elf);
145 if (ELFW(default_ehdr,LIBELFBITS) (elf, ehdr, shnum, change_bop) != 0)
149 off_t size = elf_typesize (LIBELFBITS, ELF_T_EHDR, 1);
152 if (elf->state.ELFW(elf,LIBELFBITS).phdr == NULL
155 (void) __elfw2(LIBELFBITS,getphdr_wrlock) (elf);
156 if (elf->state.ELFW(elf,LIBELFBITS).phdr != NULL)
177 + elf_typesize (LIBELFBITS, ELF_T_PHDR, phnum));
182 elf_typesize (LIBELFBITS, ELF_T_EHDR, 1),
186 size += elf_typesize (LIBELFBITS, ELF_T_PHDR, phnum);
195 assert (elf->state.ELFW(elf,LIBELFBITS).scns.cnt > 0);
201 Elf_Scn *scn0 = &elf->state.ELFW(elf,LIBELFBITS).scns.data[0];
203 update_if_changed (scn0->shdr.ELFW(e,LIBELFBITS)->sh_size,
208 list = &elf->state.ELFW(elf,LIBELFBITS).scns;
212 if (list->data[1].shdr.ELFW(e,LIBELFBITS) == NULL)
213 (void) __elfw2(LIBELFBITS,getshdr_wrlock) (&list->data[1]);
220 ElfW2(LIBELFBITS,Shdr) *shdr = scn->shdr.ELFW(e,LIBELFBITS);
224 ElfW2(LIBELFBITS,Word) sh_entsize = shdr->sh_entsize;
225 ElfW2(LIBELFBITS,Word) sh_align = shdr->sh_addralign ?: 1;
231 sh_entsize = elf_typesize (LIBELFBITS, ELF_T_SYM, 1);
234 sh_entsize = elf_typesize (LIBELFBITS, ELF_T_RELA, 1);
251 sh_entsize = elf_typesize (LIBELFBITS, ELF_T_DYN, 1);
254 sh_entsize = elf_typesize (LIBELFBITS, ELF_T_REL, 1);
257 sh_entsize = elf_typesize (LIBELFBITS, ELF_T_SYM, 1);
260 sh_entsize = elf_typesize (LIBELFBITS, ELF_T_MOVE, 1);
263 sh_entsize = elf_typesize (LIBELFBITS, ELF_T_SYMINFO, 1);
413 + (elf_typesize (LIBELFBITS, ELF_T_SHDR, shnum))));
422 #define SHDR_ALIGN sizeof (ElfW2(LIBELFBITS,Off))
427 elf_typesize (LIBELFBITS, ELF_T_SHDR, 1),
431 size += elf_typesize (LIBELFBITS, ELF_T_SHDR, shnum);
435 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ehdr_flags;