aboutsummaryrefslogtreecommitdiff
path: root/gold/gold.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2011-09-26 23:42:06 +0000
committerCary Coutant <ccoutant@google.com>2011-09-26 23:42:06 +0000
commit403a3331af14b94c59eee2f2849deb592301083c (patch)
tree3a63c388e40383df07481d7282a51e926f19136a /gold/gold.cc
parent139d7133b8c8fa9af2b78ccab99c15687d08be9a (diff)
downloadgdb-403a3331af14b94c59eee2f2849deb592301083c.zip
gdb-403a3331af14b94c59eee2f2849deb592301083c.tar.gz
gdb-403a3331af14b94c59eee2f2849deb592301083c.tar.bz2
* gold/gold.cc (queue_initial_tasks): Move option checks ...
* gold/options.cc (General_options::finalize): ... to here. Disable some options; make others fatal.
Diffstat (limited to 'gold/gold.cc')
-rw-r--r--gold/gold.cc55
1 files changed, 19 insertions, 36 deletions
diff --git a/gold/gold.cc b/gold/gold.cc
index 12f25b7..693ff79 100644
--- a/gold/gold.cc
+++ b/gold/gold.cc
@@ -197,46 +197,29 @@ queue_initial_tasks(const General_options& options,
// For incremental links, the base output file.
Incremental_binary* ibase = NULL;
- if (parameters->incremental())
- {
- if (options.relocatable())
- gold_error(_("incremental linking is incompatible with -r"));
- if (options.emit_relocs())
- gold_error(_("incremental linking is incompatible with --emit-relocs"));
- if (options.gc_sections())
- gold_error(_("incremental linking is incompatible with --gc-sections"));
- if (options.icf_enabled())
- gold_error(_("incremental linking is incompatible with --icf"));
- if (options.has_plugins())
- gold_error(_("incremental linking is incompatible with --plugin"));
- if (strcmp(options.compress_debug_sections(), "none") != 0)
- gold_error(_("incremental linking is incompatible with "
- "--compress-debug-sections"));
-
- if (parameters->incremental_update())
+ if (parameters->incremental_update())
+ {
+ Output_file* of = new Output_file(options.output_file_name());
+ if (of->open_base_file(options.incremental_base(), true))
{
- Output_file* of = new Output_file(options.output_file_name());
- if (of->open_base_file(options.incremental_base(), true))
- {
- ibase = open_incremental_binary(of);
- if (ibase != NULL
- && ibase->check_inputs(cmdline, layout->incremental_inputs()))
- ibase->init_layout(layout);
- else
- {
- delete ibase;
- ibase = NULL;
- of->close();
- }
- }
- if (ibase == NULL)
+ ibase = open_incremental_binary(of);
+ if (ibase != NULL
+ && ibase->check_inputs(cmdline, layout->incremental_inputs()))
+ ibase->init_layout(layout);
+ else
{
- if (set_parameters_incremental_full())
- gold_info(_("linking with --incremental-full"));
- else
- gold_fallback(_("restart link with --incremental-full"));
+ delete ibase;
+ ibase = NULL;
+ of->close();
}
}
+ if (ibase == NULL)
+ {
+ if (set_parameters_incremental_full())
+ gold_info(_("linking with --incremental-full"));
+ else
+ gold_fallback(_("restart link with --incremental-full"));
+ }
}
// Read the input files. We have to add the symbols to the symbol