lkml.org 
[lkml]   [2000]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRFC: binfmt_elf.c recent changes (esp fao MIPS people)
Date
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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.088 / U:1.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site