From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30843 invoked by alias); 30 Jan 2013 16:43:28 -0000 Received: (qmail 30396 invoked by uid 22791); 30 Jan 2013 16:43:20 -0000 X-SWARE-Spam-Status: No, hits=-6.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Jan 2013 16:43:03 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0UGh2Qd009887 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 30 Jan 2013 11:43:02 -0500 Received: from psique (ovpn-113-187.phx2.redhat.com [10.3.113.187]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r0UGgwlk029638; Wed, 30 Jan 2013 11:42:59 -0500 From: Sergio Durigan Junior To: Binutils Development Cc: GDB Patches , Pedro Alves , Jan Kratochvil , "H. J. Lu" Subject: Re: [PATCH 1/3] Implement new Linux target vectors on BFD References: <20130130091631.GM3244@bubble.grove.modra.org> X-URL: http://www.redhat.com Date: Wed, 30 Jan 2013 16:43:00 -0000 In-Reply-To: <20130130091631.GM3244@bubble.grove.modra.org> (Alan Modra's message of "Wed, 30 Jan 2013 19:46:31 +1030") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2013-01/txt/msg00716.txt.bz2 On Wednesday, January 30 2013, Alan Modra 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! Hm, thank you for the explanation, it didn't occurred to me. > 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. Right. Now I am stuck with this, then. While Pedro wants this feature to be Linux-specific, now there is this problem with target duplication. I will look for other solutions here, but if you alreay have some idea on how to handle it, I'd be glad to read. Thanks a lot, -- Sergio