From 15fb9978c983a54ed438ff773ab9a2c3559d06b4 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 3 Apr 2008 23:33:20 +0000 Subject: * elfcpp_swap.h (Swap_unaligned<64, true>::writeval): Correct byte order. --- elfcpp/ChangeLog | 5 +++++ elfcpp/elfcpp_swap.h | 16 ++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'elfcpp') diff --git a/elfcpp/ChangeLog b/elfcpp/ChangeLog index a35c6ef..4c22bfd 100644 --- a/elfcpp/ChangeLog +++ b/elfcpp/ChangeLog @@ -1,3 +1,8 @@ +2008-04-03 Ian Lance Taylor + + * elfcpp_swap.h (Swap_unaligned<64, true>::writeval): Correct + byte order. + 2008-03-24 Ian Lance Taylor * elfcpp.h (NT_VERSION, NT_ARCH): Define as enum constants. diff --git a/elfcpp/elfcpp_swap.h b/elfcpp/elfcpp_swap.h index 329ed16..9f445dc 100644 --- a/elfcpp/elfcpp_swap.h +++ b/elfcpp/elfcpp_swap.h @@ -367,14 +367,14 @@ struct Swap_unaligned<64, true> static inline void writeval(unsigned char* wv, Valtype v) { - wv[7] = v >> 56; - wv[6] = v >> 48; - wv[5] = v >> 40; - wv[4] = v >> 32; - wv[3] = v >> 24; - wv[2] = v >> 16; - wv[1] = v >> 8; - wv[0] = v; + wv[0] = v >> 56; + wv[1] = v >> 48; + wv[2] = v >> 40; + wv[3] = v >> 32; + wv[4] = v >> 24; + wv[5] = v >> 16; + wv[6] = v >> 8; + wv[7] = v; } }; -- cgit v1.1