aboutsummaryrefslogtreecommitdiff
path: root/gold/gold.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/gold.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/gold.h')
-rw-r--r--gold/gold.h42
1 files changed, 38 insertions, 4 deletions
diff --git a/gold/gold.h b/gold/gold.h
index 63bcb79..25f6c0c 100644
--- a/gold/gold.h
+++ b/gold/gold.h
@@ -171,10 +171,13 @@ class Command_line;
class Input_argument_list;
class Dirsearch;
class Input_objects;
+class Symbol;
class Symbol_table;
class Layout;
class Workqueue;
class Output_file;
+template<int size, bool big_endian>
+struct Relocate_info;
// The name of the program as used in error messages.
extern const char* program_name;
@@ -184,11 +187,42 @@ extern const char* program_name;
extern void
gold_exit(bool status) ATTRIBUTE_NORETURN;
-// This function is called to emit an unexpected error message and a
-// newline, and then exit with failure. If PERRNO is true, it reports
-// the error in errno.
+// This function is called to emit an error message and then
+// immediately exit with failure.
+extern void
+gold_fatal(const char* format, ...) ATTRIBUTE_NORETURN ATTRIBUTE_PRINTF_1;
+
+// This function is called to issue an error. This will cause gold to
+// eventually exit with failure.
+extern void
+gold_error(const char* msg, ...) ATTRIBUTE_PRINTF_1;
+
+// This function is called to issue a warning.
+extern void
+gold_warning(const char* msg, ...) ATTRIBUTE_PRINTF_1;
+
+// This function is called to issue an error at the location of a
+// reloc.
+template<int size, bool big_endian>
+extern void
+gold_error_at_location(const Relocate_info<size, big_endian>*,
+ size_t, off_t, const char* format, ...)
+ ATTRIBUTE_PRINTF_4;
+
+// This function is called to issue a warning at the location of a
+// reloc.
+template<int size, bool big_endian>
+extern void
+gold_warning_at_location(const Relocate_info<size, big_endian>*,
+ size_t, off_t, const char* format, ...)
+ ATTRIBUTE_PRINTF_4;
+
+// This function is called to report an undefined symbol.
+template<int size, bool big_endian>
extern void
-gold_fatal(const char* msg, bool perrno) ATTRIBUTE_NORETURN;
+gold_undefined_symbol(const Symbol*,
+ const Relocate_info<size, big_endian>*,
+ size_t, off_t);
// This is function is called in some cases if we run out of memory.
extern void