2009-08-12 Sriraman Tallam <tmsriram@google.com>
authorSriraman Tallam <tmsriram@google.com>
Thu, 13 Aug 2009 00:03:43 +0000 (00:03 +0000)
committerSriraman Tallam <tmsriram@google.com>
Thu, 13 Aug 2009 00:03:43 +0000 (00:03 +0000)
* icf.cc (Icf::find_identical_sections): Issue a warning when a
symbol in the --keep-unique list is not found.

gold/ChangeLog
gold/icf.cc

index 0f97482c2e573dd255596ce4b8be705fcec81415..14709bfe23e5cbd6a5ed0e3c81085a9568621690 100644 (file)
@@ -1,3 +1,8 @@
+2009-08-12  Sriraman Tallam  <tmsriram@google.com>
+
+       * icf.cc (Icf::find_identical_sections): Issue a warning when a
+       symbol in the --keep-unique list is not found.
+
 2009-08-12  Sriraman Tallam  <tmsriram@google.com>
 
        * icf.cc (Icf::find_identical_sections): Unfold symbols that have
index 6f9592279c7ce83a7a165db06a3f9801f9c87f15..411cf2e2344cea761c2c581420089f2e55727bb4 100644 (file)
@@ -606,9 +606,12 @@ Icf::find_identical_sections(const Input_objects* input_objects,
     {
       const char* name = p->c_str();
       Symbol* sym = symtab->lookup(name);
-      if (sym != NULL
-         && sym->source() == Symbol::FROM_OBJECT 
-          && !sym->object()->is_dynamic())
+      if (sym == NULL)
+       {
+         gold_warning(_("Could not find symbol %s to unfold\n"), name);
+       }
+      else if (sym->source() == Symbol::FROM_OBJECT 
+               && !sym->object()->is_dynamic())
         {
           Object* obj = sym->object();
           bool is_ordinary;