From: Daniel Jacobowitz <dan@debian.org>
To: linux-mips@fnet.fr, linux-mips@oss.sgi.com
Subject: Re: [patch] linux: RFC: elf_check_arch() rework
Date: Wed, 24 Jul 2002 14:08:50 -0400 [thread overview]
Message-ID: <20020724180850.GA31437@nevyn.them.org> (raw)
In-Reply-To: <Pine.GSO.3.96.1020724182704.27732L-100000@delta.ds2.pg.gda.pl>
On Wed, Jul 24, 2002 at 07:05:36PM +0200, Maciej W. Rozycki wrote:
> Hello,
>
> After noticing I cannot run a trivial ELF64 program because of the
> EF_MIPS_ARCH_3 flag (quite a reasonable setting for a 64-bit executable,
> isn't it?), I concluded a considerable rework of elf_check_arch() is
> needed as what we currently have is inadequate.
>
> Here is my proposal. I think binfmt_elf.c for mips and binfmt_elf32.c
> for mips64 should accept all ELF32 binaries either with no ABI mark (as
> produced by most versions of binutils) or with a 32 (aka o32) ABI one and
> binfmt_elf.c for mips64 should accept all ELF32 binaries with an n32 ABI
> mark and all ELF64 ones (which essentially means the 64 aka n64 ABI).
> Everything else (i.e. o64 and EABIs) is rejected. The patch adds
> necessary ELF file header flag definitions and synchronizes a few wrong
> ones to the binutils' definitions as well.
>
> It removes the bogus check of architecture flags as they are really
> irrelevant -- the code is intended to handle executable formats and not
> execution of code. If a user incorporates unsupported opcodes, he'll just
> get SIGILL at one moment. We may actually check if an architecture is
> supported even no other Linux port seems to care, but then the comparison
> should be against mips_cpu.isa_level and not against hardcoded constants.
>
> Note, this is an RFC at this stage -- I haven't tested the code
> adequately for an immediate inclusion, even if it looks obvious. There
> should be no problems with code made with old binutils as unset flags are
> treated as (o)32.
Well, that sounds like the right approach to me. It sounds like
there's some real progress on the 64-bit tools now...
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-07-24 18:19 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-24 17:05 [patch] linux: RFC: elf_check_arch() rework Maciej W. Rozycki
2002-07-24 18:08 ` Daniel Jacobowitz [this message]
2002-07-24 19:12 ` Carsten Langgaard
2002-07-24 19:31 ` Daniel Jacobowitz
2002-07-25 11:10 ` Maciej W. Rozycki
2002-07-25 13:29 ` Carsten Langgaard
2002-07-25 14:12 ` Maciej W. Rozycki
2002-07-25 15:26 ` PATCH: Update E_MIP_ARCH_XXX (Re: [patch] linux: RFC: elf_check_arch() rework) H. J. Lu
[not found] ` <mailpost.1027610779.9546@news-sj1-1>
2002-07-25 17:49 ` cgd
2002-07-25 18:50 ` David Anderson
2002-07-26 16:53 ` cgd
2002-07-26 17:12 ` Paul Koning
2002-07-29 7:47 ` PATCH: Update E_MIP_ARCH_XXX (Re: [patch] linux: RFC:elf_check_arch() rework) Carsten Langgaard
2002-07-29 7:47 ` Carsten Langgaard
2002-07-30 14:09 ` Dan Temple
2002-07-30 14:09 ` Dan Temple
2002-07-30 15:07 ` Maciej W. Rozycki
[not found] ` <mailpost.1028038253.3155@news-sj1-1>
2002-07-30 19:20 ` PATCH: Update E_MIP_ARCH_XXX (Re: [patch] linux: RFC: elf_check_arch() rework) cgd
2002-07-30 19:26 ` Geoff Keating
2002-07-30 19:27 ` cgd
2002-07-30 20:03 ` Eric Christopher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020724180850.GA31437@nevyn.them.org \
--to=dan@debian.org \
--cc=linux-mips@fnet.fr \
--cc=linux-mips@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox