Lines Matching refs:LIBELFBITS
44 #ifndef LIBELFBITS
45 # define LIBELFBITS 32 macro
51 ELFW(default_ehdr,LIBELFBITS) (Elf *elf, ElfW2(LIBELFBITS,Ehdr) *ehdr, in ELFW() argument
58 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY; in ELFW()
62 update_if_changed (ehdr->e_ident[EI_CLASS], ELFW(ELFCLASS,LIBELFBITS), in ELFW()
63 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags); in ELFW()
70 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY; in ELFW()
85 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags); in ELFW()
90 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY; in ELFW()
101 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags); in ELFW()
105 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags); in ELFW()
107 if (unlikely (ehdr->e_ehsize != elf_typesize (LIBELFBITS, ELF_T_EHDR, 1))) in ELFW()
109 ehdr->e_ehsize = elf_typesize (LIBELFBITS, ELF_T_EHDR, 1); in ELFW()
110 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY; in ELFW()
118 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ELF_F_DIRTY; in ELFW()
127 __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) in __elfw2() argument
129 ElfW2(LIBELFBITS,Ehdr) *ehdr; in __elfw2()
133 ehdr = __elfw2(LIBELFBITS,getehdr_wrlock) (elf); in __elfw2()
136 if (ELFW(default_ehdr,LIBELFBITS) (elf, ehdr, shnum, change_bop) != 0) in __elfw2()
140 off_t size = elf_typesize (LIBELFBITS, ELF_T_EHDR, 1); in __elfw2()
143 if (elf->state.ELFW(elf,LIBELFBITS).phdr == NULL in __elfw2()
146 (void) __elfw2(LIBELFBITS,getphdr_wrlock) (elf); in __elfw2()
147 if (elf->state.ELFW(elf,LIBELFBITS).phdr != NULL) in __elfw2()
168 + elf_typesize (LIBELFBITS, ELF_T_PHDR, phnum)); in __elfw2()
173 elf_typesize (LIBELFBITS, ELF_T_EHDR, 1), in __elfw2()
177 size += elf_typesize (LIBELFBITS, ELF_T_PHDR, phnum); in __elfw2()
186 assert (elf->state.ELFW(elf,LIBELFBITS).scns.cnt > 0); in __elfw2()
192 Elf_Scn *scn0 = &elf->state.ELFW(elf,LIBELFBITS).scns.data[0]; in __elfw2()
194 update_if_changed (scn0->shdr.ELFW(e,LIBELFBITS)->sh_size, in __elfw2()
199 list = &elf->state.ELFW(elf,LIBELFBITS).scns; in __elfw2()
203 if (list->data[1].shdr.ELFW(e,LIBELFBITS) == NULL) in __elfw2()
204 (void) __elfw2(LIBELFBITS,getshdr_wrlock) (&list->data[1]); in __elfw2()
211 ElfW2(LIBELFBITS,Shdr) *shdr = scn->shdr.ELFW(e,LIBELFBITS); in __elfw2()
215 ElfW2(LIBELFBITS,Word) sh_entsize = shdr->sh_entsize; in __elfw2()
216 ElfW2(LIBELFBITS,Word) sh_align = shdr->sh_addralign ?: 1; in __elfw2()
227 sh_entsize = elf_typesize (LIBELFBITS, ELF_T_SYM, 1); in __elfw2()
230 sh_entsize = elf_typesize (LIBELFBITS, ELF_T_RELA, 1); in __elfw2()
247 sh_entsize = elf_typesize (LIBELFBITS, ELF_T_DYN, 1); in __elfw2()
250 sh_entsize = elf_typesize (LIBELFBITS, ELF_T_REL, 1); in __elfw2()
253 sh_entsize = elf_typesize (LIBELFBITS, ELF_T_SYM, 1); in __elfw2()
256 sh_entsize = elf_typesize (LIBELFBITS, ELF_T_MOVE, 1); in __elfw2()
259 sh_entsize = elf_typesize (LIBELFBITS, ELF_T_SYMINFO, 1); in __elfw2()
389 ElfW2(LIBELFBITS,Word) sh_size; in __elfw2()
394 ElfW2(LIBELFBITS,Chdr) *chdr; in __elfw2()
395 chdr = elfw2(LIBELFBITS,getchdr) (scn); in __elfw2()
417 elf_typesize (LIBELFBITS, ELF_T_SHDR, 1), ehdr_flags); in __elfw2()
425 + (elf_typesize (LIBELFBITS, ELF_T_SHDR, shnum)))); in __elfw2()
434 #define SHDR_ALIGN sizeof (ElfW2(LIBELFBITS,Off)) in __elfw2()
440 size += elf_typesize (LIBELFBITS, ELF_T_SHDR, shnum); in __elfw2()
444 elf->state.ELFW(elf,LIBELFBITS).ehdr_flags |= ehdr_flags; in __elfw2()