summaryrefslogtreecommitdiff
path: root/gold/resolve.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2008-02-28 22:39:29 +0000
committerIan Lance Taylor <iant@google.com>2008-02-28 22:39:29 +0000
commit26e79fbfcd0b5cf7f7d1cbcc1995a9e7d1422e96 (patch)
tree5b2f5bd02871ce11bc8e9025bf5a070a3b48e464 /gold/resolve.cc
parent0f753b422faca3e495192cb0d07bc15debc25558 (diff)
downloadbinutils-redhat-26e79fbfcd0b5cf7f7d1cbcc1995a9e7d1422e96.tar.gz
Don't warn about redefinitions from a --just-symbols object.
Diffstat (limited to 'gold/resolve.cc')
-rw-r--r--gold/resolve.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gold/resolve.cc b/gold/resolve.cc
index 185327b4e7..c244ad42a9 100644
--- a/gold/resolve.cc
+++ b/gold/resolve.cc
@@ -318,6 +318,14 @@ Symbol_table::should_override(const Symbol* to, unsigned int frombits,
{
case DEF * 16 + DEF:
// Two definitions of the same symbol.
+
+ // If either symbol is defined by an object included using
+ // --just-symbols, then don't warn. This is for compatibility
+ // with the GNU linker. FIXME: This is a hack.
+ if ((to->source() == Symbol::FROM_OBJECT && to->object()->just_symbols())
+ || object->just_symbols())
+ return false;
+
// FIXME: Do a better job of reporting locations.
gold_error(_("%s: multiple definition of %s"),
object != NULL ? object->name().c_str() : _("command line"),