aboutsummaryrefslogtreecommitdiff
path: root/gold/tls.h
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/tls.h
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/tls.h')
-rw-r--r--gold/tls.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/gold/tls.h b/gold/tls.h
index 9324701c..7103d3f 100644
--- a/gold/tls.h
+++ b/gold/tls.h
@@ -54,12 +54,8 @@ check_range(const Relocate_info<size, big_endian>* relinfo,
{
off_t offset = rel_offset + off;
if (offset < 0 || offset > view_size)
- {
- fprintf(stderr, _("%s: %s: TLS relocation out of range\n"),
- program_name,
- relinfo->location(relnum, rel_offset).c_str());
- gold_exit(false);
- }
+ gold_error_at_location(relinfo, relnum, rel_offset,
+ _("TLS relocation out of range"));
}
// Check the validity of a TLS relocation. This is like assert.
@@ -72,13 +68,8 @@ check_tls(const Relocate_info<size, big_endian>* relinfo,
bool valid)
{
if (!valid)
- {
- fprintf(stderr,
- _("%s: %s: TLS relocation against invalid instruction\n"),
- program_name,
- relinfo->location(relnum, rel_offset).c_str());
- gold_exit(false);
- }
+ gold_error_at_location(relinfo, relnum, rel_offset,
+ _("TLS relocation against invalid instruction"));
}