This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH 1/3] Implement new Linux target vectors on BFD
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>, Binutils Development <binutils at sourceware dot org>, GDB Patches <gdb-patches at sourceware dot org>, Pedro Alves <palves at redhat dot com>, Jan Kratochvil <jan dot kratochvil at redhat dot com>, "H. J. Lu" <hongjiu dot lu at intel dot com>
- Date: Wed, 30 Jan 2013 08:44:23 -0800
- Subject: Re: [PATCH 1/3] Implement new Linux target vectors on BFD
- References: <email@example.com> <20130130091631.GM3244@bubble.grove.modra.org>
On Wed, Jan 30, 2013 at 1:16 AM, Alan Modra <firstname.lastname@example.org> wrote:
> On Wed, Jan 30, 2013 at 04:52:46AM -0200, Sergio Durigan Junior wrote:
>> 1) Add new target vectors on the BFD configury system in order to handle
>> Linux targets, which will then make it possible to use certain functions
>> only on such targets, and
> Duplicating targets isn't a really good idea.
> If on my x86_64 linux box I want to build a native binutils that also
> supports powerpc64, I can configure binutils with
> --enable-targets=powerpc64-linux, or get all targets with
> --enable-targets=all. The problem with adding bfd targets as you've
> done is that now you have two bfd targets that give equally good
> matches for powerpc64 objects. So instead of one "best" match we now
> have two. elf64-big will also match, and by a quirk of the way
> bfd_check_format_matches operates (giving priority to targets
> appearing in config.bfd targ_selvec), this match will be chosen over
> the better elf64-powerpc-* matches. That means a worse user
> experience for say, "objdump -d". A file that used to happily
> disassemble now gives you
> some_file: file format elf64-big
> binutils/objdump: can't disassemble for architecture UNKNOWN!
> You may have noticed that we've already made a mess of targets for
> ARM, i386, x86_64 and powerpc. I'd rather not see the same happen for
> powerpc64 without a really good reason.
I agree with Alan. I don't want x86 Linux BFD targets. Please
find another solution.