From: Steve McIntyre <steve.mcintyre@linaro.org>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: Roland McGrath <roland@hack.frob.com>,
libc-alpha@sourceware.org, libc-ports@sourceware.org
Subject: Re: ARM hard-float ABI: add ldconfig flag value
Date: Thu, 23 Aug 2012 15:37:00 -0000 [thread overview]
Message-ID: <20120823153556.GB8449@linaro.org> (raw)
In-Reply-To: <Pine.LNX.4.64.1208221610190.30045@digraph.polyomino.org.uk>
On Wed, Aug 22, 2012 at 04:12:40PM +0000, Joseph S. Myers wrote:
>On Wed, 22 Aug 2012, Steve McIntyre wrote:
>
>> Here's the text that we're planning to add for the next release of the
>> "ELF for the ARM Architecture" doc. I hope this covers what you're
>> asking for?
>
>Yes, I think this is sufficient.
Awesome :-)
>> There's minor changes to the exact spelling of the new flags
>> (s/EABI/ABI/). I'll send an updated patch with that change and
>> whatever coding style issues you'd like fixed, just let me know
>> please.
>
>I don't know exactly what coding style issues Roland had in mind. Apart
>from the spaces in function / macro calls that I already mentioned, I
>wouldn't use a space after "!" (but there's nothing specific in the GNU
>Coding Standards on that point, though for GCC avoiding space after "!" is
>a documented convention).
OK, here's the updated patch with the name change and tweaks to
style. All OK?
diff --git a/elf/elf.h b/elf/elf.h
index 1e67ef5..6c85f92 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -2250,6 +2250,9 @@ typedef Elf32_Addr Elf32_Conflict;
#define EF_ARM_VFP_FLOAT 0x400
#define EF_ARM_MAVERICK_FLOAT 0x800
+#define EF_ARM_ABI_FLOAT_SOFT 0x200 /* NB conflicts with EF_ARM_SOFT_FLOAT */
+#define EF_ARM_ABI_FLOAT_HARD 0x400 /* NB conflicts with EF_ARM_VFP_FLOAT */
+
/* Other constants defined in the ARM ELF spec. version B-01. */
/* NB. These conflict with values defined above. */
diff --git a/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h b/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h
index 8980bb1..77c3d8a 100644
--- a/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h
+++ b/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h
@@ -27,10 +27,22 @@
#define EXTRA_OSABI ELFOSABI_ARM_AEABI
+#ifdef __ARM_PCS_VFP
+#define VALID_FLOAT_ABI(x) \
+ ((EF_ARM_EABI_VERSION ((x)) != EF_ARM_EABI_VER5) \
+ || !((x) & EF_ARM_ABI_FLOAT_SOFT))
+#else
+#define VALID_FLOAT_ABI(x) \
+ ((EF_ARM_EABI_VERSION ((x)) != EF_ARM_EABI_VER5) \
+ || !((x) & EF_ARM_ABI_FLOAT_HARD))
+#endif
+
+#undef VALID_ELF_HEADER
#define VALID_ELF_HEADER(hdr,exp,size) \
- (memcmp (hdr, exp, size) == 0 \
+ ((memcmp (hdr, exp, size) == 0 \
|| memcmp (hdr, expected2, size) == 0 \
- || memcmp (hdr, expected3, size) == 0)
+ || memcmp (hdr, expected3, size) == 0) \
+ && VALID_FLOAT_ABI (ehdr->e_flags))
#define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV \
|| osabi == EXTRA_OSABI \
|| osabi == ELFOSABI_LINUX)
Cheers,
--
Steve McIntyre steve.mcintyre@linaro.org
<http://www.linaro.org/> Linaro.org | Open source software for ARM SoCs
next prev parent reply other threads:[~2012-08-23 15:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20120727160941.GA13597@linaro.org>
[not found] ` <20120802165658.GG24537@linaro.org>
2012-08-02 17:28 ` Roland McGrath
2012-08-02 17:49 ` Steve McIntyre
2012-08-02 17:55 ` Roland McGrath
2012-08-02 18:14 ` Steve McIntyre
2012-08-02 18:26 ` Roland McGrath
2012-08-03 16:46 ` Steve McIntyre
2012-08-08 13:41 ` Steve McIntyre
2012-08-08 16:31 ` Roland McGrath
2012-08-08 20:02 ` Joseph S. Myers
2012-08-09 0:34 ` Steve McIntyre
2012-08-09 11:10 ` Joseph S. Myers
2012-08-09 13:21 ` Steve McIntyre
2012-08-22 15:41 ` Steve McIntyre
2012-08-22 16:13 ` Joseph S. Myers
2012-08-23 15:37 ` Steve McIntyre [this message]
2012-08-23 20:40 ` Joseph S. Myers
2012-08-23 22:56 ` Steve McIntyre
2012-08-02 20:50 ` Joseph S. Myers
2012-08-03 17:04 ` Steve McIntyre
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=20120823153556.GB8449@linaro.org \
--to=steve.mcintyre@linaro.org \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=libc-ports@sourceware.org \
--cc=roland@hack.frob.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).