diff options
author | Ian Lance Taylor <ian@airs.com> | 2010-01-05 05:56:28 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2010-01-05 05:56:28 +0000 |
commit | 30bc8c4670a8c99dbfd7e7b31d2e794dab54fcda (patch) | |
tree | 97ff236eb15d44c0575de2f657401b69a569fcaa /gold/resolve.cc | |
parent | a0f1928042c71027c8f908d10da8d1f7dd17530b (diff) | |
download | gdb-30bc8c4670a8c99dbfd7e7b31d2e794dab54fcda.zip gdb-30bc8c4670a8c99dbfd7e7b31d2e794dab54fcda.tar.gz gdb-30bc8c4670a8c99dbfd7e7b31d2e794dab54fcda.tar.bz2 |
PR 10980
* 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.
Diffstat (limited to 'gold/resolve.cc')
-rw-r--r-- | gold/resolve.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gold/resolve.cc b/gold/resolve.cc index d32b2b9..24b80a8 100644 --- a/gold/resolve.cc +++ b/gold/resolve.cc @@ -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: |