From f073bbf7e0a9d7ebe5323c660b34c893c5dfedee Mon Sep 17 00:00:00 2001 From: Chris Demetriou Date: Fri, 6 Feb 2009 19:20:10 +0000 Subject: 2009-02-06 Chris Demetriou * gold.h (gold_undefined_symbol): Change to take only a Symbol pointer and to report location as the file name associated with the symbol. (gold_undefined_symbol_at_location): New function to replace the old gold_undefined_symbol functionality. * target-reloc.h (relocate_section): Update to use gold_undefined_symbol_at_location. * symtab.cc (Symbol_table::warn_about_undefined_dynobj_symbol): Call gold_undefined_symbol function rather than gold_error. * errors.h (Errors::undefined_symbol): 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): Take location as a string, rather than calculating it from a relocation. (gold_undefined_symbol_at_location): New function akin to old gold_undefined_symbol, calculates location from relocation. (gold_undefined_symbol): Change to take only a Symbol pointer and to report location as the file name associated with the symbol. * testsuite/debug_msg.sh: Update for changed error messages. * testsuite/undef_symbol.sh: Likewise. --- gold/gold.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'gold/gold.h') diff --git a/gold/gold.h b/gold/gold.h index 964de32..a0cc62d 100644 --- a/gold/gold.h +++ b/gold/gold.h @@ -202,12 +202,22 @@ gold_warning_at_location(const Relocate_info*, size_t, off_t, const char* format, ...) TEMPLATE_ATTRIBUTE_PRINTF_4; -// This function is called to report an undefined symbol. +// This function is called to report an undefined symbol without +// a relocation (e.g., referenced by a dynamic object). SYM is +// the undefined symbol. The file name associated with the SYM +// is used to print a location for the undefined symbol. +extern void +gold_undefined_symbol(const Symbol*); + +// This function is called to report an undefined symbol resulting +// from a relocation. SYM is the undefined symbol. RELINFO is the +// general relocation info. RELNUM is the number of the reloc, +// and RELOFFSET is the reloc's offset. template extern void -gold_undefined_symbol(const Symbol*, - const Relocate_info*, - size_t, off_t); +gold_undefined_symbol_at_location(const Symbol*, + const Relocate_info*, + size_t, off_t); // This is function is called in some cases if we run out of memory. extern void -- cgit v1.1