diff options
author | David S. Miller <davem@redhat.com> | 2011-09-10 05:15:43 +0000 |
---|---|---|
committer | David S. Miller <davem@redhat.com> | 2011-09-10 05:15:43 +0000 |
commit | 24c6c55a13b3d7a40cce2df940242db8a1498578 (patch) | |
tree | f60de67eb0cb3268f1ace8e63fd5a07d1d7530e5 | |
parent | 17b03c24fb193cff0478d8e4e091e384099c0018 (diff) | |
download | gdb-24c6c55a13b3d7a40cce2df940242db8a1498578.zip gdb-24c6c55a13b3d7a40cce2df940242db8a1498578.tar.gz gdb-24c6c55a13b3d7a40cce2df940242db8a1498578.tar.bz2 |
* output.cc (Output_fill_debug_info::do_write): Use Swap_unaligned.
(Output_fill_debug_line::do_write): Likewise.
-rw-r--r-- | gold/ChangeLog | 5 | ||||
-rw-r--r-- | gold/output.cc | 24 |
2 files changed, 17 insertions, 12 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index 7270c4b..bcace3c 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2011-09-09 David S. Miller <davem@davemloft.net> + + * output.cc (Output_fill_debug_info::do_write): Use Swap_unaligned. + (Output_fill_debug_line::do_write): Likewise. + 2011-08-29 Cary Coutant <ccoutant@google.com> * output.cc: (Output_fill_debug_info::do_minimum_hole_size): Add diff --git a/gold/output.cc b/gold/output.cc index 9bf6a42..29d8e3d 100644 --- a/gold/output.cc +++ b/gold/output.cc @@ -1961,15 +1961,15 @@ Output_fill_debug_info::do_write(Output_file* of, off_t off, size_t len) const // address_size. if (this->is_big_endian()) { - elfcpp::Swap<32, true>::writeval(pov, len - 4); - elfcpp::Swap<16, true>::writeval(pov + 4, this->version); - elfcpp::Swap<32, true>::writeval(pov + 6, 0); + elfcpp::Swap_unaligned<32, true>::writeval(pov, len - 4); + elfcpp::Swap_unaligned<16, true>::writeval(pov + 4, this->version); + elfcpp::Swap_unaligned<32, true>::writeval(pov + 6, 0); } else { - elfcpp::Swap<32, false>::writeval(pov, len - 4); - elfcpp::Swap<16, false>::writeval(pov + 4, this->version); - elfcpp::Swap<32, false>::writeval(pov + 6, 0); + elfcpp::Swap_unaligned<32, false>::writeval(pov, len - 4); + elfcpp::Swap_unaligned<16, false>::writeval(pov + 4, this->version); + elfcpp::Swap_unaligned<32, false>::writeval(pov + 6, 0); } pov += 4 + 2 + 4; *pov++ = 4; @@ -2021,15 +2021,15 @@ Output_fill_debug_line::do_write(Output_file* of, off_t off, size_t len) const // line number program is empty. if (this->is_big_endian()) { - elfcpp::Swap<32, true>::writeval(pov, len - 4); - elfcpp::Swap<16, true>::writeval(pov + 4, this->version); - elfcpp::Swap<32, true>::writeval(pov + 6, len - (4 + 2 + 4)); + elfcpp::Swap_unaligned<32, true>::writeval(pov, len - 4); + elfcpp::Swap_unaligned<16, true>::writeval(pov + 4, this->version); + elfcpp::Swap_unaligned<32, true>::writeval(pov + 6, len - (4 + 2 + 4)); } else { - elfcpp::Swap<32, false>::writeval(pov, len - 4); - elfcpp::Swap<16, false>::writeval(pov + 4, this->version); - elfcpp::Swap<32, false>::writeval(pov + 6, len - (4 + 2 + 4)); + elfcpp::Swap_unaligned<32, false>::writeval(pov, len - 4); + elfcpp::Swap_unaligned<16, false>::writeval(pov + 4, this->version); + elfcpp::Swap_unaligned<32, false>::writeval(pov + 6, len - (4 + 2 + 4)); } pov += 4 + 2 + 4; *pov++ = 1; // minimum_instruction_length |