From: Richard Earnshaw <rearnsha@arm.com>
To: Mark Kettenis <mark.kettenis@xs4all.nl>
Cc: gdb-patches@sourceware.org
Subject: Re: Initialize default floating-point model on ARM for GNU binaries
Date: Tue, 18 Jul 2006 16:32:00 -0000 [thread overview]
Message-ID: <1153240315.20443.52.camel@pc960.cambridge.arm.com> (raw)
In-Reply-To: <200607172250.k6HMoIN2009013@elgar.sibelius.xs4all.nl>
On Mon, 2006-07-17 at 23:50, Mark Kettenis wrote:
> Hi Richard,
>
> Here's a patch to select the default floating-point model based on
> flags set in the ELF header of binaries produced by the GNU toolchain.
> It carefully avoids doing this for binaries conforming to the (new)
> official EABI. I removed the setting of the ABI for unrecognized EABI
> versions. These will default to ARM_ABI_ACPS anyway, later on.
>
> With this patch, GDB correctly recognizes that OpenBSD/arm binaries
> use the "sofvfp" floating-point model, which reduces the number of
> testsuite failures considerably.
>
> ok?
>
> Mark
>
> P.S. It seems the code to detect the correct floating-point model is
> somewhat busted; arm-linux-tdep.c, armnbsd-tdep.c and now
> armobsd-tdep.c contain code to set tdep->fp_model if it is still set
> to ARM_FLOAT_AUTO, but that never seems to happen.
>
>
> Index: ChangeLog
> from Mark Kettenis <kettenis@gnu.org>
>
> * arm-tdep.c (arm_gdbarch_init): Get default floating-point model
> from ELF flags for binaries produced by the GNU toolchain.
I fear this isn't going to work; though not because of anything you've
done (in principle, I think your changes are fine).
The problem is that in the most common configuration still using the
legacy ELF format (arm-unknown-elf) the flags are generated incorrectly
by the compiler/assembler combination. These tools fail to correctly
set the softfpa bit in the ELF header and the result is that gdb will
think they contain FPA instructions when they do not. Thus I think this
change will cause a large number of new failures on arm-elf.
I guess we could fudge this by making the auto-detect code fold case 0
on to case EF_ARM_SOFT_FLOAT, but it would need a big comment to explain
the background.
R.
next prev parent reply other threads:[~2006-07-18 16:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-17 22:50 Mark Kettenis
2006-07-18 16:32 ` Richard Earnshaw [this message]
2006-07-18 17:48 ` Mark Kettenis
2006-07-19 8:37 ` Richard Earnshaw
2006-07-19 20:37 ` Mark Kettenis
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=1153240315.20443.52.camel@pc960.cambridge.arm.com \
--to=rearnsha@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=mark.kettenis@xs4all.nl \
/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