aboutsummaryrefslogtreecommitdiff
path: root/gold/resolve.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-10-14 06:49:14 +0000
committerIan Lance Taylor <iant@google.com>2007-10-14 06:49:14 +0000
commit75f2446ec3c13eca3fe0c7cfdbb232e760d36596 (patch)
treea243e4c2c79cd8790a316a38b552507b62bf0421 /gold/resolve.cc
parenteb4dfdd470e49ab56eed5cead19704e0926530d0 (diff)
downloadgdb-75f2446ec3c13eca3fe0c7cfdbb232e760d36596.zip
gdb-75f2446ec3c13eca3fe0c7cfdbb232e760d36596.tar.gz
gdb-75f2446ec3c13eca3fe0c7cfdbb232e760d36596.tar.bz2
Run all error handling through an Errors object. Delete output file
on error.
Diffstat (limited to 'gold/resolve.cc')
-rw-r--r--gold/resolve.cc23
1 files changed, 11 insertions, 12 deletions
diff --git a/gold/resolve.cc b/gold/resolve.cc
index 87c175a..d5167d9 100644
--- a/gold/resolve.cc
+++ b/gold/resolve.cc
@@ -133,17 +133,17 @@ Symbol_table::resolve(Sized_symbol<size>* to,
break;
case elfcpp::STB_LOCAL:
- fprintf(stderr,
- _("%s: %s: invalid STB_LOCAL symbol %s in external symbols\n"),
- program_name, object->name().c_str(), to->name());
- gold_exit(false);
+ gold_error(_("%s: invalid STB_LOCAL symbol %s in external symbols"),
+ object->name().c_str(), to->name());
+ frombits = global_flag;
+ break;
default:
- fprintf(stderr,
- _("%s: %s: unsupported symbol binding %d for symbol %s\n"),
- program_name, object->name().c_str(),
- static_cast<int>(sym.get_st_bind()), to->name());
- gold_exit(false);
+ gold_error(_("%s: unsupported symbol binding %d for symbol %s"),
+ object->name().c_str(),
+ static_cast<int>(sym.get_st_bind()), to->name());
+ frombits = global_flag;
+ break;
}
if (!object->is_dynamic())
@@ -276,9 +276,8 @@ Symbol_table::should_override(const Symbol* to, unsigned int frombits,
{
case DEF * 16 + DEF:
// Two definitions of the same symbol.
- fprintf(stderr, _("%s: multiple definition of %s\n"),
- program_name, to->name());
- // FIXME: Report locations. Record that we have seen an error.
+ // FIXME: Report locations.
+ gold_error(_("multiple definition of %s\n"), to->name());
return false;
case WEAK_DEF * 16 + DEF: