linux-mips
[Top] [All Lists]

Re: modules fail to load for 64bit kernel with 32bit ELF format

To: Dave Johnson <djohnson+linuxmips@sw.starentnetworks.com>
Subject: Re: modules fail to load for 64bit kernel with 32bit ELF format
From: Thiemo Seufer <ths@networkno.de>
Date: Wed, 3 Aug 2005 22:21:54 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <17137.2596.203177.705324@cortez.sw.starentnetworks.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <17137.2596.203177.705324@cortez.sw.starentnetworks.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.9i
Dave Johnson wrote:
> 
> Building for 64bit kernel with 32bit ELF format produces the correct
> object files for loading, but attempting to load them produces
> ENOEXEC.
> 
> This is because the object file is failing ELF header checks in
> load_module().
> 
> Elf_Ehdr in include/asm-mips/module.h is being defined as Elf64_Ehdr
> based on CONFIG_MIPS64 instead of CONFIG_BUILD_ELF64.
> 
> elf_check_arch() also needs some fixing in include/asm-mips/elf.h as
> it too is invoked from load_module(), however elf_check_arch() is also
> used in binfmt_elf*.c.
> 
> Simply changing the defines produces loads of warnings due to casting
> pointers around in module.c. Any suggestions on the best way to fix
> this?

The plan is to obsolete 64bit kernel in 32bit ELF and use 64bit ELF
with gcc -msym32 to get a similiar optimization.


Thiemo

<Prev in Thread] Current Thread [Next in Thread>