From 418d2b2dc0a736a6e315321cd18f3700dbfe13e7 Mon Sep 17 00:00:00 2001 From: ian Date: Fri, 11 Apr 2008 22:55:13 +0000 Subject: [PATCH] * output.h (class Output_section_data): Remove inline definition of set_addralign. * output.cc (Output_section_data::set_addralign): New function. --- gold/ChangeLog | 6 ++++++ gold/output.cc | 12 ++++++++++++ gold/output.h | 3 +-- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index cc05b97fdc..c022353bce 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2008-04-11 Ian Lance Taylor + + * output.h (class Output_section_data): Remove inline definition + of set_addralign. + * output.cc (Output_section_data::set_addralign): New function. + 2008-04-11 Cary Coutant Add support for TLS descriptors for i386 and x86_64. diff --git a/gold/output.cc b/gold/output.cc index 9ec14625ab..48609a21eb 100644 --- a/gold/output.cc +++ b/gold/output.cc @@ -535,6 +535,18 @@ Output_section_data::do_out_shndx() const return this->output_section_->out_shndx(); } +// Set the alignment, which means we may need to update the alignment +// of the output section. + +void +Output_section_data::set_addralign(uint64_t addralign) +{ + this->addralign_ = addralign; + if (this->output_section_ != NULL + && this->output_section_->addralign() < addralign) + this->output_section_->set_addralign(addralign); +} + // Output_data_strtab methods. // Set the final data size. diff --git a/gold/output.h b/gold/output.h index 126ec71e99..6221c6e5d7 100644 --- a/gold/output.h +++ b/gold/output.h @@ -595,8 +595,7 @@ class Output_section_data : public Output_data // Set the alignment. void - set_addralign(uint64_t addralign) - { this->addralign_ = addralign; } + set_addralign(uint64_t addralign); private: // The output section for this section. -- 2.11.0