This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[gold][arm]: Fix arm elf header flags wrt hardfp bit


Hi Cary, current gold does not set properly the hardfp bit for elf header flags.

In Target_arm::do_adjust_elf_header, both e_ident and e_flags are
modified, but only e_ident is put back to view, fixed by putting back
flags.

Test - build, and functional test (hardfp bit is properly set now)

gold/ChangeLog:
        * arm.cc (Target_arm::do_adjust_elf_header): Set flags into view.

Ok for trunk?


diff --git a/gold/arm.cc b/gold/arm.cc
index ec8b89d..621b28e 100644
--- a/gold/arm.cc
+++ b/gold/arm.cc
@@ -10551,16 +10551,17 @@ Target_arm<big_endian>::do_adjust_elf_header(
   flags |= elfcpp::EF_ARM_ABI_FLOAT_HARD;
  else
   flags |= elfcpp::EF_ARM_ABI_FLOAT_SOFT;
  this->set_processor_specific_flags(flags);
       }
   }
   elfcpp::Ehdr_write<32, big_endian> oehdr(view);
   oehdr.put_e_ident(e_ident);
+  oehdr.put_e_flags(this->processor_specific_flags());
 }

 // do_make_elf_object to override the same function in the base class.
 // We need to use a target-specific sub-class of
 // Sized_relobj_file<32, big_endian> to store ARM specific information.
 // Hence we need to have our own ELF object creation.

 template<bool big_endian>


-- 
Han Shen


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]