linux-mips
[Top] [All Lists]

Re: ELF32 problem in mips64 kernel

To: Kip Walker <kwalker@broadcom.com>
Subject: Re: ELF32 problem in mips64 kernel
From: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Date: Fri, 20 Sep 2002 14:30:25 +0200 (MET DST)
Cc: linux-mips@linux-mips.org
In-reply-to: <3D88F022.E414C40F@broadcom.com>
Organization: Technical University of Gdansk
Original-recipient: rfc822;linux-mips@linux-mips.org
Reply-to: "Maciej W. Rozycki" <macro@ds2.pg.gda.pl>
Sender: linux-mips-bounce@linux-mips.org
On Wed, 18 Sep 2002, Kip Walker wrote:

> in elf_check_arch, the following access to the "e_flags" field is
> non-sensical if the binary is ELFCLASS32, because "__h" is typed as an
> elf64_hdr (through the elfhdr #define), whose e_flags is in a different
> location from an elf32_hdr.

 Thanks for pointing it out.

>         if ((__h->e_ident[EI_CLASS] == ELFCLASS32) &&     \
>             ((__h->e_flags & EF_MIPS_ABI2) == 0))         \
>                 __res = 0;                                \
> 
> Should the n32 check (is this what the EF_MIPS_ABI2 check is about?) be
> punted to another binary format handler?  The attached patch removed the
> ABI2 check.

 Since the layout of the ELF32 header much differs from the ELF64 one it
doesn't really make sense to handle both formats together.  The change
looks OK. 

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


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