aboutsummaryrefslogtreecommitdiff
path: root/gold/object.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-11-14 07:34:53 +0000
committerIan Lance Taylor <iant@google.com>2007-11-14 07:34:53 +0000
commite2827e5f525574e8620bd43c8bcb27dba3407a7f (patch)
treea72625b3bd98a7beb23dde4aad331598572564f3 /gold/object.cc
parenta55ce7febfaa52670ce3d9c236d3033de80ac091 (diff)
downloadgdb-e2827e5f525574e8620bd43c8bcb27dba3407a7f.zip
gdb-e2827e5f525574e8620bd43c8bcb27dba3407a7f.tar.gz
gdb-e2827e5f525574e8620bd43c8bcb27dba3407a7f.tar.bz2
Warn about undefined references in shared libraries if we have seen
all the DT_NEEDED entries for that library.
Diffstat (limited to 'gold/object.cc')
-rw-r--r--gold/object.cc26
1 files changed, 26 insertions, 0 deletions
diff --git a/gold/object.cc b/gold/object.cc
index c0e2acd..fa16d13 100644
--- a/gold/object.cc
+++ b/gold/object.cc
@@ -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