diff options
author | Ian Lance Taylor <iant@google.com> | 2008-02-28 22:39:29 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2008-02-28 22:39:29 +0000 |
commit | 878405a88922f96bbfa665f35e275bd5567c2ad6 (patch) | |
tree | 073ca2b683c2886c0d67b887633c2a74cf0393af /gold/resolve.cc | |
parent | 0dfbdef4c43cfe12bb3e2505ebe5acc651a35c98 (diff) | |
download | fsf-binutils-gdb-878405a88922f96bbfa665f35e275bd5567c2ad6.zip fsf-binutils-gdb-878405a88922f96bbfa665f35e275bd5567c2ad6.tar.gz fsf-binutils-gdb-878405a88922f96bbfa665f35e275bd5567c2ad6.tar.bz2 |
Don't warn about redefinitions from a --just-symbols object.
Diffstat (limited to 'gold/resolve.cc')
-rw-r--r-- | gold/resolve.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gold/resolve.cc b/gold/resolve.cc index 185327b..c244ad4 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"), |