* options.h (class General_options): Add
	--allow-multiple-definition and -z muldefs.
	* resolve.cc (Symbol_table::should_override): Don't warn about a
	multiple symbol definition if --allow-multiple-definition or -z
	muldefs.
This commit is contained in:
Ian Lance Taylor
2010-01-05 05:56:28 +00:00
parent a0f1928042
commit 30bc8c4670
3 changed files with 21 additions and 3 deletions

View File

@ -440,9 +440,11 @@ Symbol_table::should_override(const Symbol* to, unsigned int frombits,
|| (object != NULL && object->just_symbols()))
return false;
Symbol_table::report_resolve_problem(true,
_("multiple definition of '%s'"),
to, defined, object);
if (!parameters->options().allow_multiple_definition()
&& !parameters->options().muldefs())
Symbol_table::report_resolve_problem(true,
_("multiple definition of '%s'"),
to, defined, object);
return false;
case WEAK_DEF * 16 + DEF: