aboutsummaryrefslogtreecommitdiff
path: root/gold/gold.cc
diff options
context:
space:
mode:
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