X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gold%2Ferrors.cc;h=8339742eaf0160ed2de4d6d04f0783810ef3c2ff;hb=d0ae9fbda7513c1cab463bf1a9b21fdef40e7c56;hp=b58650488236fca56b3184602933c26e2a951341;hpb=308ecdc7cee575abd597cbbc4465c67376bd14e5;p=binutils-gdb.git diff --git a/gold/errors.cc b/gold/errors.cc index b5865048823..8339742eaf0 100644 --- a/gold/errors.cc +++ b/gold/errors.cc @@ -1,6 +1,6 @@ // errors.cc -- handle errors for gold -// Copyright 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. +// Copyright (C) 2006-2014 Free Software Foundation, Inc. // Written by Ian Lance Taylor . // This file is part of gold. @@ -81,7 +81,18 @@ Errors::fatal(const char* format, va_list args) fprintf(stderr, _("%s: fatal error: "), this->program_name_); vfprintf(stderr, format, args); fputc('\n', stderr); - gold_exit(false); + gold_exit(GOLD_ERR); +} + +// Report a fallback error. + +void +Errors::fallback(const char* format, va_list args) +{ + fprintf(stderr, _("%s: fatal error: "), this->program_name_); + vfprintf(stderr, format, args); + fputc('\n', stderr); + gold_exit(GOLD_FALLBACK); } // Report an error. @@ -182,6 +193,11 @@ Errors::undefined_symbol(const Symbol* sym, const std::string& location) fprintf(stderr, _("%s: %s: undefined reference to '%s', version '%s'\n"), location.c_str(), zmsg, sym->demangled_name().c_str(), version); + + if (sym->is_cxx_vtable()) + gold_info(_("%s: the vtable symbol may be undefined because " + "the class is missing its key function"), + program_name); } // Issue a debugging message. @@ -212,6 +228,17 @@ gold_fatal(const char* format, ...) va_end(args); } +// Report a fallback error. + +void +gold_fallback(const char* format, ...) +{ + va_list args; + va_start(args, format); + parameters->errors()->fallback(format, args); + va_end(args); +} + // Report an error. void