mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 00:59:15 +08:00
2010-04-13 Doug Kwan <dougkwan@google.com>
* arm.cc (Arm_input_section::set_final_data_size): Compute accurate final data size instead of using current data size.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2010-04-13 Doug Kwan <dougkwan@google.com>
|
||||||
|
|
||||||
|
* arm.cc (Arm_input_section::set_final_data_size): Compute
|
||||||
|
accurate final data size instead of using current data size.
|
||||||
|
|
||||||
2010-04-09 Doug Kwan <dougkwan@google.com>
|
2010-04-09 Doug Kwan <dougkwan@google.com>
|
||||||
|
|
||||||
* layout.cc (Layout::choose_output_section): Handle script section
|
* layout.cc (Layout::choose_output_section): Handle script section
|
||||||
|
18
gold/arm.cc
18
gold/arm.cc
@ -4935,21 +4935,17 @@ template<bool big_endian>
|
|||||||
void
|
void
|
||||||
Arm_input_section<big_endian>::set_final_data_size()
|
Arm_input_section<big_endian>::set_final_data_size()
|
||||||
{
|
{
|
||||||
// If this owns a stub table, finalize its data size as well.
|
off_t off = convert_types<off_t, uint64_t>(this->original_size_);
|
||||||
|
|
||||||
if (this->is_stub_table_owner())
|
if (this->is_stub_table_owner())
|
||||||
{
|
{
|
||||||
uint64_t address = this->address();
|
|
||||||
|
|
||||||
// The stub table comes after the original section contents.
|
// The stub table comes after the original section contents.
|
||||||
address += this->original_size_;
|
off = align_address(off, this->stub_table_->addralign());
|
||||||
address = align_address(address, this->stub_table_->addralign());
|
this->stub_table_->set_address_and_file_offset(this->address() + off,
|
||||||
off_t offset = this->offset() + (address - this->address());
|
this->offset() + off);
|
||||||
this->stub_table_->set_address_and_file_offset(address, offset);
|
off += this->stub_table_->data_size();
|
||||||
address += this->stub_table_->data_size();
|
|
||||||
gold_assert(address == this->address() + this->current_data_size());
|
|
||||||
}
|
}
|
||||||
|
this->set_data_size(off);
|
||||||
this->set_data_size(this->current_data_size());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset address and file offset.
|
// Reset address and file offset.
|
||||||
|
Reference in New Issue
Block a user