• Home
  • Raw
  • Download

Lines Matching refs:ehdr

55 ELFW(default_ehdr,LIBELFBITS) (Elf *elf, ElfW2(LIBELFBITS,Ehdr) *ehdr,  in ELFW()
59 if (memcmp (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG) != 0) in ELFW()
61 memcpy (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG); in ELFW()
66 update_if_changed (ehdr->e_ident[EI_CLASS], ELFW(ELFCLASS,LIBELFBITS), in ELFW()
70 if (unlikely (ehdr->e_ident[EI_DATA] == ELFDATANONE)) in ELFW()
72 ehdr->e_ident[EI_DATA] = in ELFW()
76 else if (unlikely (ehdr->e_ident[EI_DATA] >= ELFDATANUM)) in ELFW()
83 && ehdr->e_ident[EI_DATA] != ELFDATA2LSB) in ELFW()
85 && ehdr->e_ident[EI_DATA] != ELFDATA2MSB)); in ELFW()
88 update_if_changed (ehdr->e_ident[EI_VERSION], EV_CURRENT, in ELFW()
91 if (unlikely (ehdr->e_version == EV_NONE)) in ELFW()
93 ehdr->e_version = EV_CURRENT; in ELFW()
96 else if (unlikely (ehdr->e_version != EV_CURRENT)) in ELFW()
104 update_if_changed (ehdr->e_shnum, 0, in ELFW()
108 update_if_changed (ehdr->e_shnum, shnum, in ELFW()
111 if (unlikely (ehdr->e_ehsize != elf_typesize (LIBELFBITS, ELF_T_EHDR, 1))) in ELFW()
113 ehdr->e_ehsize = elf_typesize (LIBELFBITS, ELF_T_EHDR, 1); in ELFW()
119 if (ehdr->e_phnum == 0 && ehdr->e_phoff != 0) in ELFW()
121 ehdr->e_phoff = 0; in ELFW()
133 ElfW2(LIBELFBITS,Ehdr) *ehdr; in __elfw2()
137 ehdr = __elfw2(LIBELFBITS,getehdr_wrlock) (elf); in __elfw2()
140 if (ELFW(default_ehdr,LIBELFBITS) (elf, ehdr, shnum, change_bop) != 0) in __elfw2()
160 ehdr->e_phoff in __elfw2()
165 update_if_changed (ehdr->e_phoff, in __elfw2()
234 if (ehdr->e_type != ET_REL) in __elfw2()
244 sh_entsize = SH_ENTSIZE_HASH (ehdr); in __elfw2()
418 update_if_changed (ehdr->e_shentsize, in __elfw2()
426 (ehdr->e_shoff in __elfw2()
439 update_if_changed (ehdr->e_shoff, size, elf->flags); in __elfw2()