aboutsummaryrefslogtreecommitdiff
path: root/gold/errors.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2011-06-08 04:43:28 +0000
committerCary Coutant <ccoutant@google.com>2011-06-08 04:43:28 +0000
commite6455dfbc2dae8cc91f64b4120e87e138970cf84 (patch)
treeae3c3f5e8ee74a9e4ea1951152ffa055096758b6 /gold/errors.cc
parentfb0e076f5c3d8bfd1f23a96031bfbfb92dc657d2 (diff)
downloadgdb-e6455dfbc2dae8cc91f64b4120e87e138970cf84.zip
gdb-e6455dfbc2dae8cc91f64b4120e87e138970cf84.tar.gz
gdb-e6455dfbc2dae8cc91f64b4120e87e138970cf84.tar.bz2
* common.cc (Symbol_table::do_allocate_commons_list): Call
gold_fallback. * errors.cc (Errors::fatal): Adjust call to gold_exit. (Errors::fallback): New function. (gold_fallback): New function. * errors.h (Errors::fallback): New function. * gold.cc (gold_exit): Change status parameter to enum; adjust all callers. (queue_initial_tasks): Call gold_fallback. * gold.h: Include cstdlib. (Exit_status): New enum type. (gold_exit): Change status parameter to enum. (gold_fallback): New function. * layout.cc (Layout::set_section_offsets): Call gold_fallback. (Layout::create_symtab_sections): Likewise. (Layout::create_shdrs): Likewise. * main.cc (main): Adjust call to gold_exit. * output.cc (Output_data_got::add_got_entry): Call gold_fallback. (Output_data_got::add_got_entry_pair): Likewise. (Output_section::add_input_section): Likewise. (Output_section::add_output_section_data): Likewise. (Output_segment::set_section_list_addresses): Likewise. * x86_64.cc (Output_data_plt_x86_64::add_entry): Likewise.
Diffstat (limited to 'gold/errors.cc')
-rw-r--r--gold/errors.cc24
1 files changed, 23 insertions, 1 deletions
diff --git a/gold/errors.cc b/gold/errors.cc
index b586504..b79764b 100644
--- a/gold/errors.cc
+++ b/gold/errors.cc
@@ -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.
@@ -212,6 +223,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