From: Ian Lance Taylor Date: Wed, 9 Apr 2008 00:33:48 +0000 (+0000) Subject: * errors.cc (Errors::undefined_symbol): Mention symbol version if X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=789aa6de31480d7b322e515b43451b1b1108fedc;p=binutils-gdb.git * errors.cc (Errors::undefined_symbol): Mention symbol version if there is one. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index 78ff07e83c4..5ca3cfc5be6 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,5 +1,8 @@ 2008-04-08 Ian Lance Taylor + * errors.cc (Errors::undefined_symbol): Mention symbol version if + there is one. + * layout.h (class Layout): Add added_eh_frame_data_ field. * layout.cc (Layout::Layout): Initialize new field. (Layout::layout_eh_frame): Don't add eh_frame_data_ to .eh_frame diff --git a/gold/errors.cc b/gold/errors.cc index e352dc49147..c43e9f3e912 100644 --- a/gold/errors.cc +++ b/gold/errors.cc @@ -158,9 +158,15 @@ Errors::undefined_symbol(const Symbol* sym, 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.