diff options
author | Cary Coutant <ccoutant@gmail.com> | 2021-03-19 18:41:12 -0700 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2021-03-19 18:41:12 -0700 |
commit | 35891b4775d860b6fad15765bbf85be2b8101419 (patch) | |
tree | 35e314ccd363655ad4822265aa5bf4a169623a0e /gold/errors.cc | |
parent | b218a839358197c1b62200481dc14eb3c8a9a38f (diff) | |
download | binutils-gdb-35891b4775d860b6fad15765bbf85be2b8101419.tar.gz |
Use stdout when printing object file names for -t option.
gold/
PR gold/27615
* errors.cc (Errors::trace): New method.
(gold_trace): New function.
* errors.h (Errors::trace): New method.
* gold.h (gold_trace): New function.
* object.cc (Input_objects::add_object): Use gold_trace to print
object file names.
Diffstat (limited to 'gold/errors.cc')
-rw-r--r-- | gold/errors.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gold/errors.cc b/gold/errors.cc index 755e65d71ff..156fd69c306 100644 --- a/gold/errors.cc +++ b/gold/errors.cc @@ -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> @@ -275,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> |