Messages in this thread | | | From | Russell King <> | Subject | RFC: binfmt_elf.c recent changes (esp fao MIPS people) | Date | Mon, 10 Jul 2000 16:56:45 +0100 (BST) |
| |
Hi,
Currently (test3-pre8) the code in fs/binfmt_elf.c consists of:
if (!elf_check_arch(elf_ex.e_machine)) goto out; #if defined(__mips__) && !defined(__mips64) /* IRIX5 binaries handled elsewhere. */ if (elf_ex.e_flags & EF_MIPS_ARCH) { retval = -ENOEXEC; goto out; } #endif #if defined(__mips__) && defined(__mips64) /* Linux/MIPS 32-bit binaries handled elsewhere. */ if (sizeof(elf_caddr_t) == 8 && elf_ex.e_ident[EI_CLASS] == ELFCLASS32) { retval = -ENOEXEC; goto out; } #endif
I'd like to clean this up (as we have done in the ARM tree) to:
if (!elf_check_arch(&elf_ex)) goto out;
and move those ugly #ifs into the MIPS elf.h header file. This then allows any field of the ELF header to be checked by the architecture specific code (which incidentally is what the ARM architecture does).
Could the MIPS people please let me know if the conditions you have within the #if defined() sections also apply to the interpreter and the libraries please? _____ |_____| ------------------------------------------------- ---+---+- | | Russell King rmk@arm.linux.org.uk --- --- | | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / | | +-+-+ --- -+- / | THE developer of ARM Linux |+| /|\ / | | | --- | +-+-+ ------------------------------------------------- /\\\ |
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |