diff options
| author | kleink <kleink@NetBSD.org> | 1999-10-25 13:55:06 +0000 |
|---|---|---|
| committer | kleink <kleink@NetBSD.org> | 1999-10-25 13:55:06 +0000 |
| commit | 522cbf02485f5279911e044c1cae61a5ea0de878 (patch) | |
| tree | 5c1600c6e903e27ba3b6900bf2825c4d8ed3a7ca /sys/compat/linux/common/linux_exec_elf32.c | |
| parent | ce00cce069a5df30abd207be9f81579b12ee58bb (diff) | |
Update to match new SVR4-style definition names in <sys/exec_elf.h>.
Diffstat (limited to 'sys/compat/linux/common/linux_exec_elf32.c')
| -rw-r--r-- | sys/compat/linux/common/linux_exec_elf32.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sys/compat/linux/common/linux_exec_elf32.c b/sys/compat/linux/common/linux_exec_elf32.c index 33aec71424d..5ab354db77a 100644 --- a/sys/compat/linux/common/linux_exec_elf32.c +++ b/sys/compat/linux/common/linux_exec_elf32.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec_elf32.c,v 1.42 1999/04/30 23:07:01 cgd Exp $ */ +/* $NetBSD: linux_exec_elf32.c,v 1.43 1999/10/25 13:55:07 kleink Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -145,7 +145,7 @@ ELFNAME2(linux,gcc_signature)(p, epp, eh) * Header cannot have a load address, or flags and * it must be large enough. */ - if (s->sh_type != Elf_sht_progbits || + if (s->sh_type != SHT_PROGBITS || s->sh_addr != 0 || s->sh_flags != 0 || s->sh_size < sizeof(signature) - 1) @@ -182,7 +182,7 @@ ELFNAME2(linux,signature)(p, epp, eh) { size_t i; Elf_Phdr *ph; - Elf_Note *notep; + Elf_Nhdr *notep; size_t phsize; int error = ENOEXEC; @@ -196,15 +196,15 @@ ELFNAME2(linux,signature)(p, epp, eh) Elf_Phdr *ephp = &ph[i]; u_int32_t ostype; - if (ephp->p_type != Elf_pt_interp /* XAX pt_note */ + if (ephp->p_type != PT_INTERP /* XAX PT_NOTE */ #if 0 || ephp->p_flags != 0 - || ephp->p_filesz < sizeof(Elf_Note)) + || ephp->p_filesz < sizeof(Elf_Nhdr)) #endif ) continue; - notep = (Elf_Note *)malloc(ephp->p_filesz+1, M_TEMP, M_WAITOK); + notep = (Elf_Nhdr *)malloc(ephp->p_filesz+1, M_TEMP, M_WAITOK); if ((error = ELFNAME(read_from)(p, epp->ep_vp, ephp->p_offset, (caddr_t)notep, ephp->p_filesz)) != 0) goto out3; @@ -226,24 +226,24 @@ ELFNAME2(linux,signature)(p, epp, eh) goto out2; /* XXX XAX Should handle NETBSD_TYPE_EMULNAME */ - if (notep->type != ELF_NOTE_TYPE_OSVERSION) { + if (notep->n_type != ELF_NOTE_TYPE_OSVERSION) { free(notep, M_TEMP); continue; } /* Check the name and description sizes. */ - if (notep->namesz != ELF_NOTE_GNU_NAMESZ || - notep->descsz != ELF_NOTE_GNU_DESCSZ) + if (notep->n_namesz != ELF_NOTE_GNU_NAMESZ || + notep->n_descsz != ELF_NOTE_GNU_DESCSZ) goto out2; /* Is the name "GNU\0"? */ - if (memcmp((notep + sizeof(Elf_Note)), + if (memcmp((notep + sizeof(Elf_Nhdr)), ELF_NOTE_GNU_NAME, ELF_NOTE_GNU_NAMESZ)) goto out2; /* Make sure the OS is Linux */ - ostype = (u_int32_t)(*((u_int32_t *)notep + sizeof(Elf_Note) + - notep->namesz)) & ELF_NOTE_GNU_OSMASK; + ostype = (u_int32_t)(*((u_int32_t *)notep + sizeof(Elf_Nhdr) + + notep->n_namesz)) & ELF_NOTE_GNU_OSMASK; if (ostype != ELF_NOTE_GNU_OSLINUX) goto out2; |
