[gold patch rfa] print "error: " in front of error messages
Chris Demetriou
cgd@google.com
Fri Feb 6 00:07:00 GMT 2009
On Thu, Feb 5, 2009 at 00:29, Ian Lance Taylor <iant@google.com> wrote:
> Thanks for the background. Let's add "error" where needed.
> Errors::fatal should use "fatal error", by analogy with gcc.
Fixing undefined_symbol turned out to be a bit more fun that I'd
hoped, because there's on location that rolled its own similar message
using gold_error. Since that would put the 'error: ' in the wrong
place, ... Once I changed error_at_location and undefined_symbol, I
also had to update some tests. Anyway, new changelog below and patch
attached.
I overloaded a function here. If you'd rather avoid overloads, or
want the refactored functions ... refactored differently, let me know.
(I'm not sure what c++ coding style you here. I didn't see any
guidance in the GNU coding style that specifically mentioned
overloads.)
built/tested i686-linux, no failures.
chris
----
2009-02-05 Chris Demetriou <cgd@google.com>
* gold.h (gold_undefined_symbol): Add an overload that takes
only the symbol (i.e., doesn't take relocation information).
Document arguments.
* errors.h (Errors::undefined_symbol): Change to take location
as a string, rather than calculating it from a relocation.
* errors.cc (Errors::fatal): Print "fatal error:" before the
formatted message.
(Errors::error, Errors::error_at_location): Print "error: "
before the formatted message.
(Errors::undefined_symbol): Change to take a string which
contains location information.
(gold_undefined_symbol): Add overload that takes only the
undefined symbol. Change the overloads which take relocation
information to calculate location before passing to
Errors::undefined_symbol.
* symtab.cc (Symbol_table::warn_about_undefined_dynobj_symbol):
Call gold_undefined_symbol rather than gold_error to report
undefined symbols.
* testsuite/debug_msg.sh: Update for changed error messages.
* testsuite/undef_symbol.sh: Likewise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: err.patch
Type: text/x-patch
Size: 12905 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090206/82af2e23/attachment.bin>
More information about the Binutils
mailing list