summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2008-04-09 01:19:09 +0000
committerIan Lance Taylor <ian@airs.com>2008-04-09 01:19:09 +0000
commita0b0bf89ce2921f5690c36bcc31e15ef974f7c82 (patch)
tree54a0a5d7a9cef71aa4106feb12d4b34dfe40d053
parentf6a3fd0f05455d0be710cb238d89f8e0005e80ff (diff)
downloadbinutils-redhat-a0b0bf89ce2921f5690c36bcc31e15ef974f7c82.tar.gz
* options.h (class General_options): Add --noinhibit-exec option.
* main.cc (main): Check --noinhibit-exec.
-rw-r--r--gold/ChangeLog3
-rw-r--r--gold/main.cc5
-rw-r--r--gold/options.h3
3 files changed, 10 insertions, 1 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 73347b19d3..e79fd7b81b 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,5 +1,8 @@
2008-04-08 Ian Lance Taylor <iant@google.com>
+ * options.h (class General_options): Add --noinhibit-exec option.
+ * main.cc (main): Check --noinhibit-exec.
+
* options.h (class General_options): Define --wrap as a special
option. Add wrap_symbols_ field.
(General_options::any_wrap_symbols): New function.
diff --git a/gold/main.cc b/gold/main.cc
index 2966d0351e..9b6ded0810 100644
--- a/gold/main.cc
+++ b/gold/main.cc
@@ -220,5 +220,8 @@ main(int argc, char** argv)
layout.print_stats();
}
- gold_exit(errors.error_count() == 0);
+ // If the user used --noinhibit-exec, we force the exit status to be
+ // successful. This is compatible with GNU ld.
+ gold_exit(errors.error_count() == 0
+ || parameters->options().noinhibit_exec());
}
diff --git a/gold/options.h b/gold/options.h
index 487603fa87..8d624e5b00 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -538,6 +538,9 @@ class General_options
DEFINE_string(m, options::EXACTLY_ONE_DASH, 'm', "",
N_("Ignored for compatibility"), N_("EMULATION"));
+ DEFINE_bool(noinhibit_exec, options::TWO_DASHES, '\0', false,
+ N_("Create an output file even if errors occur"), NULL);
+
DEFINE_string(output, options::TWO_DASHES, 'o', "a.out",
N_("Set output file name"), N_("FILE"));