From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5601 invoked by alias); 30 Jan 2013 09:16:47 -0000 Received: (qmail 5581 invoked by uid 22791); 30 Jan 2013 09:16:46 -0000 X-SWARE-Spam-Status: No, hits=-4.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pb0-f50.google.com (HELO mail-pb0-f50.google.com) (209.85.160.50) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 30 Jan 2013 09:16:41 +0000 Received: by mail-pb0-f50.google.com with SMTP id ro8so858382pbb.9 for ; Wed, 30 Jan 2013 01:16:41 -0800 (PST) X-Received: by 10.68.212.200 with SMTP id nm8mr11145157pbc.4.1359537401266; Wed, 30 Jan 2013 01:16:41 -0800 (PST) Received: from bubble.grove.modra.org ([101.166.26.37]) by mx.google.com with ESMTPS id qb3sm1032359pbb.35.2013.01.30.01.16.36 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Jan 2013 01:16:39 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id AD470EA0457; Wed, 30 Jan 2013 19:46:31 +1030 (CST) Date: Wed, 30 Jan 2013 09:16:00 -0000 From: Alan Modra To: Sergio Durigan Junior Cc: Binutils Development , GDB Patches , Pedro Alves , Jan Kratochvil , "H. J. Lu" Subject: Re: [PATCH 1/3] Implement new Linux target vectors on BFD Message-ID: <20130130091631.GM3244@bubble.grove.modra.org> Mail-Followup-To: Sergio Durigan Junior , Binutils Development , GDB Patches , Pedro Alves , Jan Kratochvil , "H. J. Lu" References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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/msg00713.txt.bz2 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. -- Alan Modra Australia Development Lab, IBM