[Top] [All Lists]

Re: ELF32 problem in mips64 kernel

To: Kip Walker <>
Subject: Re: ELF32 problem in mips64 kernel
From: "Maciej W. Rozycki" <>
Date: Fri, 20 Sep 2002 14:30:25 +0200 (MET DST)
In-reply-to: <>
Organization: Technical University of Gdansk
Original-recipient: rfc822;
Reply-to: "Maciej W. Rozycki" <>
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:, PGP key available        +

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