z80 assembler: Fix new unexpected overflow warning in v2.37
[binutils-gdb.git] / gold / errors.cc
index f90e53fe53d574850cec6b1306b7f485fa829b14..663fe614d61239e8bce5241475824a14219841ea 100644 (file)
@@ -1,6 +1,6 @@
 // errors.cc -- handle errors for gold
 
-// Copyright (C) 2006-2016 Free Software Foundation, Inc.
+// Copyright (C) 2006-2022 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -128,6 +128,15 @@ Errors::info(const char* format, va_list args)
   fputc('\n', stderr);
 }
 
+// Print a trace message.
+
+void
+Errors::trace(const char* format, va_list args)
+{
+  vfprintf(stdout, format, args);
+  fputc('\n', stdout);
+}
+
 // Report an error at a reloc location.
 
 template<int size, bool big_endian>
@@ -198,6 +207,9 @@ Errors::undefined_symbol(const Symbol* sym, const std::string& location)
     gold_info(_("%s: the vtable symbol may be undefined because "
                "the class is missing its key function"),
              program_name);
+  if (sym->is_placeholder())
+    gold_info(_("%s: the symbol should have been defined by a plugin"),
+             program_name);
 }
 
 // Issue a debugging message.
@@ -272,6 +284,17 @@ gold_info(const char* format, ...)
   va_end(args);
 }
 
+// Print a trace message (to stdout).
+
+void
+gold_trace(const char* format, ...)
+{
+  va_list args;
+  va_start(args, format);
+  parameters->errors()->trace(format, args);
+  va_end(args);
+}
+
 // Report an error at a location.
 
 template<int size, bool big_endian>