Lines Matching defs:eh
163 Ehdr * eh = elf->ed_ehdr;
164 unsigned ver = eh->e_version;
165 register char *p = (char *)eh->e_ident;
180 eh->e_ehsize = (Half)hi;
181 if (eh->e_phnum != 0) {
183 eh->e_phentsize = (Half)elf_fsize(ELF_T_PHDR, 1, ver);
185 eh->e_phoff = (Off)hi;
186 hi += eh->e_phentsize * eh->e_phnum;
188 eh->e_phoff = 0;
189 eh->e_phentsize = 0;
203 eh->e_shnum = 0;
303 eh->e_shoff = (Off)hi;
315 eh->e_shnum = scncnt;
320 eh->e_shnum = 0;
323 eh->e_shentsize = (Half)elf_fsize(ELF_T_SHDR, 1, ver);
324 hi += eh->e_shentsize * scncnt;
326 eh->e_shoff = 0;
327 eh->e_shentsize = 0;
347 Ehdr * eh = elf->ed_ehdr;
348 unsigned ver = eh->e_version;
349 register char *p = (char *)eh->e_ident;
364 eh->e_ehsize = (Half)hi;
373 if (eh->e_phnum != 0)
375 eh->e_phentsize = (Half)elf_fsize(ELF_T_PHDR, 1, ver);
377 eh->e_phentsize = 0;
378 if ((sz = eh->e_phoff + eh->e_phentsize * eh->e_phnum) > hi)
388 eh->e_shnum = 0;
430 eh->e_shentsize = (Half)elf_fsize(ELF_T_SHDR, 1, ver);
432 eh->e_shnum = scncnt;
437 eh->e_shnum = 0;
440 eh->e_shentsize = 0;
443 if ((sz = eh->e_shoff + eh->e_shentsize * scncnt) > hi)
464 Ehdr *eh = elf->ed_ehdr;
465 unsigned ver = eh->e_version;
482 eh->e_ident[EI_DATA];
533 src.d_buf = (Elf_Void *)eh;
538 dst.d_size = eh->e_ehsize;
543 hi = eh->e_ehsize;
549 if (eh->e_phnum != 0) {
562 dst.d_buf = (Elf_Void *)(image + eh->e_phoff);
563 dst.d_size = eh->e_phnum * eh->e_phentsize;
564 hi = (Xword)(eh->e_phoff + dst.d_size);
669 if (fill && (eh->e_shoff > hi)) {
670 sz = eh->e_shoff - hi;
676 dst.d_buf = (Elf_Void *)(image + eh->e_shoff);
677 dst.d_size = eh->e_shentsize;
689 dst.d_buf = (char *)dst.d_buf + eh->e_shentsize;
747 Ehdr *eh = elf->ed_ehdr;
801 if (eh == 0) {
807 if ((u = eh->e_version) > EV_CURRENT) {
814 eh->e_version = EV_CURRENT;
816 if ((u = eh->e_ident[EI_DATA]) == ELFDATANONE) {
826 eh->e_ident[EI_DATA] = (Byte)encode;
862 Ehdr *eh;
872 eh = elf->ed_ehdr;
873 e_phnum = eh->e_phnum;
874 ver = eh->e_version;
875 encode = eh->e_ident[EI_DATA];
877 src.d_buf = dst.d_buf = (Elf_Void *)eh;