From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21742 invoked by alias); 4 Mar 2011 22:26:39 -0000 Received: (qmail 21733 invoked by uid 22791); 4 Mar 2011 22:26:38 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-pz0-f41.google.com (HELO mail-pz0-f41.google.com) (209.85.210.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Mar 2011 22:26:33 +0000 Received: by pzk33 with SMTP id 33so589051pzk.0 for ; Fri, 04 Mar 2011 14:26:31 -0800 (PST) Received: by 10.142.132.3 with SMTP id f3mr977902wfd.36.1299277591783; Fri, 04 Mar 2011 14:26:31 -0800 (PST) Received: from bubble.grove.modra.org ([115.187.252.19]) by mx.google.com with ESMTPS id p40sm3544563wfc.5.2011.03.04.14.26.28 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Mar 2011 14:26:30 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 7FEAA170C1FA; Sat, 5 Mar 2011 08:56:23 +1030 (CST) Date: Fri, 04 Mar 2011 22:26:00 -0000 From: Alan Modra To: "H.J. Lu" Cc: Dave Korn , binutils@sourceware.org Subject: Re: PATCH: Report plugin symbol status Message-ID: <20110304222623.GF6275@bubble.grove.modra.org> Mail-Followup-To: "H.J. Lu" , Dave Korn , binutils@sourceware.org References: <20110302195553.GA27754@intel.com> <4D6EE4C2.3040500@gmail.com> <20110304035134.GW13094@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes 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: 2011-03/txt/msg00072.txt.bz2 On Fri, Mar 04, 2011 at 12:46:11PM -0800, H.J. Lu wrote: > * ld.texinfo: Document --verbose[=NUMBER]. > > * lexsup.c (ld_options): Update --verbose. > (parse_args): Set report_plugin_symbols. > > * plugin.c (report_plugin_symbols): New. > (get_symbols): Report plugin symbols if report_plugin_symbols > is TRUE. > > * plugin.h (report_plugin_symbols): New. OK, except @@ -1337,6 +1338,13 @@ parse_args (unsigned argc, char **argv) version_printed = TRUE; trace_file_tries = TRUE; overflow_cutoff_limit = -2; + if (optarg != NULL) + { + char *end; + report_plugin_symbols = strtoul (optarg, &end, 0); + if (*end) + einfo (_("%P%F: invalid number `%s'\n"), optarg); + } break; case 'v': ldversion (0); I think it would be cleaner to make report_plugin_symbols a boolean here, rather than leaving it as the --verbose arg and testing for greater than one later. Alternatively, rename the variable "verbose_arg" or somesuch. Either way is fine. +report_symbol: + if (report_plugin_symbols > 1) + einfo ("%P: %B: symbol `%s' definition: %d, resolution: %d\n", + abfd, syms[n].name, syms[n].def, syms[n].resolution); -- Alan Modra Australia Development Lab, IBM