From aa92d6edc48569b34bddc50f537fde8330151a80 Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Tue, 24 May 2011 23:31:07 +0000 Subject: * gold.cc (queue_initial_tasks): Pass incremental base filename to Output_file::open_base_file; don't print error message. * incremental-dump.cc (main): Adjust call to Output_file::open_for_modification. * incremental-dump.cc (main): Likewise. * incremental.cc (Incremental_inputs::report_command_line): Ignore --incremental-base option when comparing command lines. Ignore parameter when given as separate argument. * options.h (class General_options): Add --incremental-base. * output.cc (Output_file::Output_file): (Output_file::open_base_file): Add base_name and writable parameters; read base file into new file; print error message here. (Output_file::map_no_anonymous): Add writable parameter; adjust all callers. * output.h (Output_file::open_for_modification): Rename to... (Output_file::open_base_file): ...this; add base_name and writable parameters; adjust all callers. (Output_file::map_no_anonymous): Add writable parameter; adjust all callers. * testsuite/Makefile.am (incremental_test_4): Test --incremental-base. * testsuite/Makefile.in: Regenerate. --- gold/output.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gold/output.h') diff --git a/gold/output.h b/gold/output.h index 8ca3598ab0..da2e9cb735 100644 --- a/gold/output.h +++ b/gold/output.h @@ -4188,9 +4188,10 @@ class Output_file // Try to open an existing file. Returns false if the file doesn't // exist, has a size of 0 or can't be mmaped. This method is - // thread-unsafe. + // thread-unsafe. If BASE_NAME is not NULL, use the contents of + // that file as the base for incremental linking. bool - open_for_modification(); + open_base_file(const char* base_name, bool writable); // Open the output file. FILE_SIZE is the final size of the file. // If the file already exists, it is deleted/truncated. This method @@ -4275,7 +4276,7 @@ class Output_file // Map the file into memory. bool - map_no_anonymous(); + map_no_anonymous(bool); // Unmap the file from memory (and flush to disk buffers). void -- cgit v1.2.3