From 1715a13cc2716b05ab6715f81c5d1f852675ed20 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 4 Mar 2011 23:44:01 +0000 Subject: Report plugin symbols for --verbose=N. 2011-03-04 H.J. Lu * 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. --- ld/lexsup.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'ld/lexsup.c') diff --git a/ld/lexsup.c b/ld/lexsup.c index acb63fb9da..8cf96eb6ff 100644 --- a/ld/lexsup.c +++ b/ld/lexsup.c @@ -560,8 +560,9 @@ static const struct ld_option ld_options[] = " ignore-all, report-all, ignore-in-object-files,\n" " ignore-in-shared-libs"), TWO_DASHES }, - { {"verbose", no_argument, NULL, OPTION_VERBOSE}, - '\0', NULL, N_("Output lots of information during link"), TWO_DASHES }, + { {"verbose", optional_argument, NULL, OPTION_VERBOSE}, + '\0', N_("[=NUMBER]"), + N_("Output lots of information during link"), TWO_DASHES }, { {"dll-verbose", no_argument, NULL, OPTION_VERBOSE}, /* Linux. */ '\0', NULL, NULL, NO_HELP }, { {"version-script", required_argument, NULL, OPTION_VERSION_SCRIPT }, @@ -1326,6 +1327,14 @@ parse_args (unsigned argc, char **argv) version_printed = TRUE; trace_file_tries = TRUE; overflow_cutoff_limit = -2; + if (optarg != NULL) + { + char *end; + int level = strtoul (optarg, &end, 0); + if (*end) + einfo (_("%P%F: invalid number `%s'\n"), optarg); + report_plugin_symbols = level > 1; + } break; case 'v': ldversion (0); -- cgit v1.2.1