diff options
author | Ian Lance Taylor <ian@airs.com> | 2009-09-01 17:32:35 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2009-09-01 17:32:35 +0000 |
commit | 44453f85d94b039d2c66cdd19a49adc2d35f6cda (patch) | |
tree | 64a499d7c20a4e8c8c84f037894aed6344f3fcd9 /gold/incremental.cc | |
parent | 404c2abb01aeb1f5434d613036ee101bf256e57a (diff) | |
download | gdb-44453f85d94b039d2c66cdd19a49adc2d35f6cda.zip gdb-44453f85d94b039d2c66cdd19a49adc2d35f6cda.tar.gz gdb-44453f85d94b039d2c66cdd19a49adc2d35f6cda.tar.bz2 |
* gold.cc: Include "incremental.h".
(queue_initial_tasks): Call Incremental_checker methods.
* incremental.cc: Include "output.h".
(Incremental_checker::can_incrementally_link_output_file): New
method.
* incremental.h (Incremental_checker): New class.
Diffstat (limited to 'gold/incremental.cc')
-rw-r--r-- | gold/incremental.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gold/incremental.cc b/gold/incremental.cc index 25caabe..4a3ecb1 100644 --- a/gold/incremental.cc +++ b/gold/incremental.cc @@ -25,6 +25,7 @@ #include "output.h" #include "incremental.h" #include "archive.h" +#include "output.h" using elfcpp::Convert; @@ -149,6 +150,18 @@ class Incremental_inputs_entry_write internal::Incremental_inputs_entry_data* p_; }; +// Analyzes the output file to check if incremental linking is possible and +// (to be done) what files need to be relinked. + +bool +Incremental_checker::can_incrementally_link_output_file() +{ + Output_file output(this->output_name_); + if (!output.open_for_modification()) + return false; + return true; +} + // Add the command line to the string table, setting // command_line_key_. In incremental builds, the command line is // stored in .gnu_incremental_inputs so that the next linker run can |