* errors.cc (Errors::undefined_symbol): Mention symbol version if
authorIan Lance Taylor <ian@airs.com>
Wed, 9 Apr 2008 00:33:48 +0000 (00:33 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 9 Apr 2008 00:33:48 +0000 (00:33 +0000)
there is one.

gold/ChangeLog
gold/errors.cc

index 78ff07e83c4f323de4087902b66a99f3584c3052..5ca3cfc5be6007c9786830fcf741f11040705a66 100644 (file)
@@ -1,5 +1,8 @@
 2008-04-08  Ian Lance Taylor  <iant@google.com>
 
+       * errors.cc (Errors::undefined_symbol): Mention symbol version if
+       there is one.
+
        * layout.h (class Layout): Add added_eh_frame_data_ field.
        * layout.cc (Layout::Layout): Initialize new field.
        (Layout::layout_eh_frame): Don't add eh_frame_data_ to .eh_frame
index e352dc49147740e54c4a860b14f2e0c60ad91f18..c43e9f3e912f77a7829bc1691b8e14b78f549fec 100644 (file)
@@ -158,9 +158,15 @@ Errors::undefined_symbol(const Symbol* sym,
       return;
     ++this->error_count_;
   }
-  fprintf(stderr, _("%s: %s: undefined reference to '%s'\n"),
-         this->program_name_, relinfo->location(relnum, reloffset).c_str(),
-         sym->demangled_name().c_str());
+  const char* const version = sym->version();
+  if (version == NULL)
+    fprintf(stderr, _("%s: %s: undefined reference to '%s'\n"),
+           this->program_name_, relinfo->location(relnum, reloffset).c_str(),
+           sym->demangled_name().c_str());
+  else
+    fprintf(stderr, _("%s: %s: undefined reference to '%s', version '%s'\n"),
+           this->program_name_, relinfo->location(relnum, reloffset).c_str(),
+           sym->demangled_name().c_str(), version);
 }
 
 // Issue a debugging message.