• Home
  • Raw
  • Download

Lines Matching refs:ehdr

53 ELFW(default_ehdr,LIBELFBITS) (Elf *elf, ElfW2(LIBELFBITS,Ehdr) *ehdr,  in ELFW()
57 if (memcmp (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG) != 0) in ELFW()
59 memcpy (&ehdr->e_ident[EI_MAG0], ELFMAG, SELFMAG); in ELFW()
64 update_if_changed (ehdr->e_ident[EI_CLASS], ELFW(ELFCLASS,LIBELFBITS), in ELFW()
68 if (unlikely (ehdr->e_ident[EI_DATA] == ELFDATANONE)) in ELFW()
70 ehdr->e_ident[EI_DATA] = in ELFW()
74 else if (unlikely (ehdr->e_ident[EI_DATA] >= ELFDATANUM)) in ELFW()
81 && ehdr->e_ident[EI_DATA] != ELFDATA2LSB) in ELFW()
83 && ehdr->e_ident[EI_DATA] != ELFDATA2MSB)); in ELFW()
86 update_if_changed (ehdr->e_ident[EI_VERSION], EV_CURRENT, in ELFW()
89 if (unlikely (ehdr->e_version == EV_NONE)) in ELFW()
91 ehdr->e_version = EV_CURRENT; in ELFW()
94 else if (unlikely (ehdr->e_version != EV_CURRENT)) in ELFW()
102 update_if_changed (ehdr->e_shnum, 0, in ELFW()
106 update_if_changed (ehdr->e_shnum, shnum, in ELFW()
109 if (unlikely (ehdr->e_ehsize != elf_typesize (LIBELFBITS, ELF_T_EHDR, 1))) in ELFW()
111 ehdr->e_ehsize = elf_typesize (LIBELFBITS, ELF_T_EHDR, 1); in ELFW()
117 if (ehdr->e_phnum == 0 && ehdr->e_phoff != 0) in ELFW()
119 ehdr->e_phoff = 0; in ELFW()
131 ElfW2(LIBELFBITS,Ehdr) *ehdr; in __elfw2()
135 ehdr = __elfw2(LIBELFBITS,getehdr_wrlock) (elf); in __elfw2()
138 if (ELFW(default_ehdr,LIBELFBITS) (elf, ehdr, shnum, change_bop) != 0) in __elfw2()
158 ehdr->e_phoff in __elfw2()
163 update_if_changed (ehdr->e_phoff, in __elfw2()
232 if (ehdr->e_type != ET_REL) in __elfw2()
242 sh_entsize = SH_ENTSIZE_HASH (ehdr); in __elfw2()
428 update_if_changed (ehdr->e_shentsize, in __elfw2()
436 (ehdr->e_shoff in __elfw2()
449 update_if_changed (ehdr->e_shoff, size, elf->flags); in __elfw2()