From 3aec4f9c2fe16765755d252ffe05aff9eb10bf8b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= Date: Thu, 3 Dec 2009 04:26:01 +0000 Subject: [PATCH] 2009-12-02 Rafael Avila de Espindola * incremental.cc (make_sized_incremental_binary): Set the target. Error if it is incompatible. * output.h (Output_file): Add filename method. --- gold/ChangeLog | 6 ++++++ gold/incremental.cc | 5 +++++ gold/output.h | 5 +++++ 3 files changed, 16 insertions(+) diff --git a/gold/ChangeLog b/gold/ChangeLog index 02c05543af7..0d9e80a99ad 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2009-12-02 Rafael Avila de Espindola + + * incremental.cc (make_sized_incremental_binary): Set the target. + Error if it is incompatible. + * output.h (Output_file): Add filename method. + 2009-12-02 Rafael Avila de Espindola * incremental.cc (Incremental_inputs_entry): Remove unused argument diff --git a/gold/incremental.cc b/gold/incremental.cc index 4af4ef30d9f..506c575e66f 100644 --- a/gold/incremental.cc +++ b/gold/incremental.cc @@ -333,6 +333,11 @@ make_sized_incremental_binary(Output_file* file, return NULL; } + if (!parameters->target_valid()) + set_parameters_target(target); + else if (target != ¶meters->target()) + gold_error(_("%s: incompatible target"), file->filename()); + return new Sized_incremental_binary(file, ehdr, target); } diff --git a/gold/output.h b/gold/output.h index 7e1c73bb54f..6631aa1e849 100644 --- a/gold/output.h +++ b/gold/output.h @@ -3653,6 +3653,11 @@ class Output_file filesize() { return this->file_size_; } + // Return the name of this file. + const char* + filename() + { return this->name_; } + // We currently always use mmap which makes the view handling quite // simple. In the future we may support other approaches. -- 2.30.2