This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Report plugin symbol status
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