From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3948 invoked by alias); 4 Dec 2010 03:47:16 -0000 Received: (qmail 3939 invoked by uid 22791); 4 Dec 2010 03:47:16 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_BJ X-Spam-Check-By: sourceware.org Received: from mail-iw0-f169.google.com (HELO mail-iw0-f169.google.com) (209.85.214.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 04 Dec 2010 03:47:09 +0000 Received: by iwn33 with SMTP id 33so357065iwn.0 for ; Fri, 03 Dec 2010 19:47:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.164.68 with SMTP id f4mr686078icy.162.1291434427989; Fri, 03 Dec 2010 19:47:07 -0800 (PST) Received: by 10.42.176.10 with HTTP; Fri, 3 Dec 2010 19:47:07 -0800 (PST) In-Reply-To: References: <201012011701.28717.vapier@gentoo.org> Date: Sat, 04 Dec 2010 03:47:00 -0000 Message-ID: Subject: Re: Using binutils with all target enabled From: Arnaud Lacombe To: Mike Frysinger Cc: binutils@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2010-12/txt/msg00178.txt.bz2 Hi all, On Wed, Dec 1, 2010 at 6:16 PM, Arnaud Lacombe wrote: > Hi, > > On Wed, Dec 1, 2010 at 5:01 PM, Mike Frysinger wrote: >> On Wednesday, December 01, 2010 14:27:10 Arnaud Lacombe wrote: >>> I'd have hoped that specifying the the format explicits would have >>> been possible, but very few program seems to support such options. >>> Actually, only objdump (maybe others) accepts a '-b' flags. >> >> ld has -m, objcopy/strip have -F/-O/-I, readelf doesnt care, addr2line/n= m/size >> have --target. =A0seems like just as, ar, and ranlib are missing command= line >> flags, and --target might be the logical flag to add to them. > thanks... that would have been trivial to add if ar/ranlib's options > parsing did not look so fragile :( > > I suspect the following: > > =A0if (argc =3D=3D 2 && strcmp (argv[1], "-M") =3D=3D 0) > =A0 =A0{ > =A0 =A0 =A0mri_emul (); > =A0 =A0 =A0xexit (0); > =A0 =A0} > > is already broken when --plugin is used. > > Is there any interest to see "--target" taught to ar/ranlib in > mainstream's binutils (in which can I can spend some time to write a > patch) or is it not worth it (in which case I'll just do a nasty local > hack) ? > I just sent the patches teaching the --target flag to binutils/ar (and doing a bit of refactoring). They are certainly not regressions-free, and certainly not enough commented/documented. Anyway, I leave them open to comment if anybody cares. - Arnaud