Warn about undefined references in shared libraries if we have seen

all the DT_NEEDED entries for that library.
This commit is contained in:
Ian Lance Taylor
2007-11-14 07:34:53 +00:00
parent a55ce7febf
commit e2827e5f52
15 changed files with 367 additions and 81 deletions

View File

@ -1080,6 +1080,32 @@ Input_objects::add_object(Object* obj)
return true;
}
// For each dynamic object, record whether we've seen all of its
// explicit dependencies.
void
Input_objects::check_dynamic_dependencies() const
{
for (Dynobj_list::const_iterator p = this->dynobj_list_.begin();
p != this->dynobj_list_.end();
++p)
{
const Dynobj::Needed& needed((*p)->needed());
bool found_all = true;
for (Dynobj::Needed::const_iterator pneeded = needed.begin();
pneeded != needed.end();
++pneeded)
{
if (this->sonames_.find(*pneeded) == this->sonames_.end())
{
found_all = false;
break;
}
}
(*p)->set_has_unknown_needed_entries(!found_all);
}
}
// Relocate_info methods.
// Return a string describing the location of a relocation. This is