public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Dave Korn <dave.korn.cygwin@gmail.com>, binutils@sourceware.org
Subject: Re: PATCH: Report plugin symbol status
Date: Fri, 04 Mar 2011 22:26:00 -0000	[thread overview]
Message-ID: <20110304222623.GF6275@bubble.grove.modra.org> (raw)
In-Reply-To: <AANLkTik3ZOTn7qmpZHv1EO+a3-Mv6w2bQ38DQTm+COt9@mail.gmail.com>

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

  reply	other threads:[~2011-03-04 22:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-02 19:56 H.J. Lu
2011-03-03  0:46 ` Dave Korn
2011-03-03  3:40   ` H.J. Lu
2011-03-04  0:16     ` Dave Korn
2011-03-04  3:51     ` Alan Modra
2011-03-04 20:46       ` H.J. Lu
2011-03-04 22:26         ` Alan Modra [this message]
2011-03-04 23:45           ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110304222623.GF6275@bubble.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    --cc=dave.korn.cygwin@gmail.com \
    --cc=hjl.tools@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).