summaryrefslogtreecommitdiffstats
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2011-03-04 23:44:01 +0000
committerH.J. Lu <hjl.tools@gmail.com>2011-03-04 23:44:01 +0000
commit1715a13cc2716b05ab6715f81c5d1f852675ed20 (patch)
tree75321a4f5b940b002179db047cf2dc0dfa9f90ed /ld/lexsup.c
parent51dc551dc20e8447413408430af80e253f5e872f (diff)
downloadppe42-binutils-1715a13cc2716b05ab6715f81c5d1f852675ed20.tar.gz
ppe42-binutils-1715a13cc2716b05ab6715f81c5d1f852675ed20.zip
Report plugin symbols for --verbose=N.
2011-03-04 H.J. Lu <hongjiu.lu@intel.com> * 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.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c13
1 files changed, 11 insertions, 2 deletions
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);
OpenPOWER on IntegriCloud