This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[gold][arm]: Fix arm elf header flags wrt hardfp bit
- From: Han Shen <shenhan at google dot com>
- To: Cary Coutant <ccoutant at gmail dot com>, binutils <binutils at sourceware dot org>, Luis Lozano <llozano at google dot com>, Wei Zhong <wzhong at google dot com>
- Date: Thu, 16 Jul 2015 16:06:24 -0700
- Subject: [gold][arm]: Fix arm elf header flags wrt hardfp bit
- Authentication-results: sourceware.org; auth=none
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