linux-mips
[Top] [All Lists]

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

To: linux-mips@linux-mips.org
Subject: modules fail to load for 64bit kernel with 32bit ELF format
From: Dave Johnson <djohnson+linuxmips@sw.starentnetworks.com>
Date: Wed, 3 Aug 2005 14:17:08 -0400
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
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?

-- 
Dave Johnson
Starent Networks


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