Lines Matching defs:ehdr
103 STATIC INT32 OsVerifyEhdr(const LD_ELF_EHDR *ehdr, UINT32 fileLen)
105 if (memcmp(ehdr->e_ident, LD_ELFMAG, LD_SELFMAG) != LOS_OK) {
109 if (ehdr->e_type != ET_DYN) {
113 if (!check_arch(ehdr)) {
117 if (ehdr->e_phnum > PHDR_NUM_MAX) {
121 if (ehdr->e_phoff > fileLen) {
191 LD_ELF_EHDR *ehdr = &dlInfo->elfEhdr;
193 if ((ehdr->e_phnum == 0) || (ehdr->e_phentsize != sizeof(LD_ELF_PHDR))) {
197 size = sizeof(LD_ELF_PHDR) * ehdr->e_phnum;
198 if ((ehdr->e_phoff + size) > fileLen) {
207 ret = OsReadELFInfo(fd, (UINT8 *)dlInfo->elfPhdr, size, ehdr->e_phoff);