This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] Implement new Linux target vectors on BFD


On Wed, Jan 30, 2013 at 1:16 AM, Alan Modra <amodra@gmail.com> 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.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]