This is the mail archive of the 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

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

        * (Target_arm::do_adjust_elf_header): Set flags into view.

Ok for trunk?

diff --git a/gold/ b/gold/
index ec8b89d..621b28e 100644
--- a/gold/
+++ b/gold/
@@ -10551,16 +10551,17 @@ Target_arm<big_endian>::do_adjust_elf_header(
   flags |= elfcpp::EF_ARM_ABI_FLOAT_HARD;
   flags |= elfcpp::EF_ARM_ABI_FLOAT_SOFT;
   elfcpp::Ehdr_write<32, big_endian> oehdr(view);
+  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]