// errors.cc -- handle errors for gold
-// Copyright 2006, 2007 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
this->increment_counter(&this->warning_count_);
}
+// Print an informational message.
+
+void
+Errors::info(const char* format, va_list args)
+{
+ vfprintf(stderr, format, args);
+ fputc('\n', stderr);
+}
+
// Report an error at a reloc location.
template<int size, bool big_endian>
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.
va_end(args);
}
+// Print an informational message.
+
+void
+gold_info(const char* format, ...)
+{
+ va_list args;
+ va_start(args, format);
+ parameters->errors()->info(format, args);
+ va_end(args);
+}
+
// Report an error at a location.
template<int size, bool big_endian>