* symtab.cc (Warnings::issue_warning): Don't warn if relocation

occurs in same object.
This commit is contained in:
Ian Lance Taylor 2011-06-16 17:55:48 +00:00
parent bcd823f19e
commit 9d3b06987a
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2011-06-16 Ian Lance Taylor <iant@google.com>
* symtab.cc (Warnings::issue_warning): Don't warn if relocation
occurs in same object.
2011-06-14 Alan Modra <amodra@gmail.com>
* po/POTFILES.in: Regenerate.

View file

@ -3282,6 +3282,12 @@ Warnings::issue_warning(const Symbol* sym,
size_t relnum, off_t reloffset) const
{
gold_assert(sym->has_warning());
// We don't want to issue a warning for a relocation against the
// symbol in the same object file in which the symbol is defined.
if (sym->object() == relinfo->object)
return;
Warning_table::const_iterator p = this->warnings_.find(sym->name());
gold_assert(p != this->warnings_.end());
gold_warning_at_location(relinfo, relnum, reloffset,