This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: QNX binutils targets
- From: Segher Boessenkool <segher at koffie dot nl>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: Graeme Peterson <gp at qnx dot com>, binutils at sources dot redhat dot com
- Date: Thu, 24 Oct 2002 23:32:00 +0200
- Subject: Re: QNX binutils targets
- References: <20021015205159.M22176@bubble.sa.bigpond.net.au>
Alan Modra wrote:
>
> The QNX targets were reusing bfd target names. Not good if you're
> building a multiple-target bfd lib and would like to specify a
> QNX target.
I was misusing an --enable-targets=all binutils today, and I noticed
the same thing, plus some more.
My host is elf powerpc linux, and i was working on some elf i686
linux files. Using the current stable release, btw. (2.13?)
BFD was unable to autodetect the fileformat of the i686 .o's,
saying somthing like "ambiguous match: elf32-i386 elf32-i386".
Quite confusing, twice the same name ;)
One of these turned out to be the QNX variant, so I patched
elf32-i386qnx.c to have a different TARGET_LITTLE_NAME, just
like your patch (which was in my mailbox but not in my tree).
After this, it of course still had an ambiguous match, but
at least it showed two different names.
I then applied this patch:
--- targets.c.bak Mon Jul 1 10:31:52 2002
+++ targets.c Thu Oct 24 15:13:36 2002
@@ -782,7 +782,10 @@
&bfd_elf32_hppa_vec,
&bfd_elf32_i370_vec,
&bfd_elf32_i386_vec,
+#if 0
+ /* This is detected as elf32-i386 which causes double matches. */
&bfd_elf32_i386qnx_vec,
+#endif
&bfd_elf32_i860_little_vec,
&bfd_elf32_i860_vec,
&bfd_elf32_i960_vec,
which makes things work as I like. It seems this is done for some other
ambiguously detected formats as well.
This might not be the correct fix; but I hope someone will code up a
better fix.
p.s. I hope this isn't already fixed in CVS; i just don't have the
bandwidth to update sources often.
Cheers,
Segher