diff options
author | Doug Kwan <dougkwan@google.com> | 2010-06-16 18:19:18 +0000 |
---|---|---|
committer | Doug Kwan <dougkwan@google.com> | 2010-06-16 18:19:18 +0000 |
commit | 3e23530232f272b7a55c6492948bdd76f65e7334 (patch) | |
tree | bf7106ce1f6695b5cc04bb055876d8f091b7dc19 /gold | |
parent | 6ffe3d995fe9fa5d95fabecaf299b9d8bdf38679 (diff) | |
download | fsf-binutils-gdb-3e23530232f272b7a55c6492948bdd76f65e7334.zip fsf-binutils-gdb-3e23530232f272b7a55c6492948bdd76f65e7334.tar.gz fsf-binutils-gdb-3e23530232f272b7a55c6492948bdd76f65e7334.tar.bz2 |
2010-06-16 Doug Kwan <dougkwan@google.com>
* arm.cc (Target_arm::do_finalize_sections): Do not emit an
.ARM.attributes section if we have not merged any input
attributes sections.
Diffstat (limited to 'gold')
-rw-r--r-- | gold/ChangeLog | 6 | ||||
-rw-r--r-- | gold/arm.cc | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index f5e960a..afb8753 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2010-06-16 Doug Kwan <dougkwan@google.com> + + * arm.cc (Target_arm::do_finalize_sections): Do not emit an + .ARM.attributes section if we have not merged any input + attributes sections. + 2010-06-15 Viktor Kutuzov <vkutuzov@accesssoftek.com> * arm.cc: Allow combining objects with no EABI version diff --git a/gold/arm.cc b/gold/arm.cc index ff07a90..d9aa767 100644 --- a/gold/arm.cc +++ b/gold/arm.cc @@ -8101,6 +8101,7 @@ Target_arm<big_endian>::do_finalize_sections( const Input_objects* input_objects, Symbol_table* symtab) { + bool merged_any_attributes = false; // Merge processor-specific flags. for (Input_objects::Relobj_iterator p = input_objects->relobj_begin(); p != input_objects->relobj_end(); @@ -8115,6 +8116,7 @@ Target_arm<big_endian>::do_finalize_sections( arm_relobj->processor_specific_flags()); this->merge_object_attributes(arm_relobj->name().c_str(), arm_relobj->attributes_section_data()); + merged_any_attributes = true; } } @@ -8129,6 +8131,7 @@ Target_arm<big_endian>::do_finalize_sections( arm_dynobj->processor_specific_flags()); this->merge_object_attributes(arm_dynobj->name().c_str(), arm_dynobj->attributes_section_data()); + merged_any_attributes = true; } // Create an empty uninitialized attribute section if we still don't have it @@ -8210,9 +8213,9 @@ Target_arm<big_endian>::do_finalize_sections( } } - // Create an .ARM.attributes section unless we have no regular input - // object. In that case the output will be empty. - if (input_objects->number_of_relobjs() != 0) + // Create an .ARM.attributes section if we have merged any attributes + // from inputs. + if (merged_any_attributes) { Output_attributes_section_data* attributes_section = new Output_attributes_section_data(*this->attributes_section_data_); |