summaryrefslogtreecommitdiff
path: root/elfcpp
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2008-04-03 23:33:20 +0000
committerIan Lance Taylor <ian@airs.com>2008-04-03 23:33:20 +0000
commit6f6b28f0e017893579dced201434d25af0e570e6 (patch)
tree3b1488adbd3ca0724d15b2740143d34a55b78e42 /elfcpp
parent899efabb18f009f73f747694318d9c6e0a4735a3 (diff)
downloadbinutils-redhat-6f6b28f0e017893579dced201434d25af0e570e6.tar.gz
* elfcpp_swap.h (Swap_unaligned<64, true>::writeval): Correct
byte order.
Diffstat (limited to 'elfcpp')
-rw-r--r--elfcpp/ChangeLog5
-rw-r--r--elfcpp/elfcpp_swap.h16
2 files changed, 13 insertions, 8 deletions
diff --git a/elfcpp/ChangeLog b/elfcpp/ChangeLog
index a35c6ef74a..4c22bfd9a9 100644
--- a/elfcpp/ChangeLog
+++ b/elfcpp/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-03 Ian Lance Taylor <iant@google.com>
+
+ * elfcpp_swap.h (Swap_unaligned<64, true>::writeval): Correct
+ byte order.
+
2008-03-24 Ian Lance Taylor <iant@google.com>
* elfcpp.h (NT_VERSION, NT_ARCH): Define as enum constants.
diff --git a/elfcpp/elfcpp_swap.h b/elfcpp/elfcpp_swap.h
index 329ed16383..9f445dc69a 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;
}
};