* options.h (class General_options): Add --warn-common.
	* resolve.cc (Symbol_table::resolve): Handle --warn-common when
	merging two common symbols.
	(Symbol_table::should_override): Handle --warn-common when merging
	a common symbol with a defined symbol.  Use report_resolve_problem
	for multiple definitions.
	(Symbol_table::report_resolve_problem): New function.
	* symtab.h (class Symbol_table): Declare report_resolve_problem.
This commit is contained in:
Ian Lance Taylor
2009-11-04 01:24:41 +00:00
parent 690a96ed8c
commit 1ae4d23b73
4 changed files with 99 additions and 15 deletions

View File

@@ -918,6 +918,10 @@ class General_options
DEFINE_special(version_script, options::TWO_DASHES, '\0',
N_("Read version script"), N_("FILE"));
DEFINE_bool(warn_common, options::TWO_DASHES, '\0', false,
N_("Warn about duplicate common symbols"),
N_("Do not warn about duplicate common symbols (default)"));
DEFINE_bool(warn_constructors, options::TWO_DASHES, '\0', false,
N_("Ignored"), N_("Ignored"));