This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [SH-ELF] : Mismatch in 'e_flags' value in elf header for Renesas SHC and GNUSH objects
- From: Paul Brook <paul at codesourcery dot com>
- To: binutils at sourceware dot org
- Cc: Andrew STUBBS <andrew dot stubbs at st dot com>, Gina Verlekar <Gina dot Verlekar at kpitcummins dot com>, binutils at sources dot redhat dot com
- Date: Wed, 11 Apr 2007 15:07:39 +0100
- Subject: Re: [SH-ELF] : Mismatch in 'e_flags' value in elf header for Renesas SHC and GNUSH objects
- References: <B9D27836A814694B95A1C294F714576632A40C@sohm.kpit.com> <461CBE9F.2010002@st.com>
On Wednesday 11 April 2007 11:55, Andrew STUBBS wrote:
> Gina Verlekar wrote:
> > Is it possible to have the same set of values (matching the Renesas SHC
> > values) for "e_flags" as generic and not option dependent?
>
> You mean throw away the GNU values and only use Renesas values? No, of
> course not, that would break everything for everyone else. Not that
> there's anything to stop you doing it in your sources for your
> customers, of course.
>
> If you can find a reliable way to auto-detect what scheme is being used
> and do the right thing, then that might be desirable, but is that even
> possible?
FWIW the way ARM handles this is to use the high bits of the e_flags field as
a version number. The meaning of the other flags (indeed much of the rest of
the file) is dependent on that version number.
Obviously if you already have two existing incompatible specifications this
doesn't help. However it does give you a mechanism for defining a less broken
ABI going forward.
Paul