summary refs log tree commit diff stats
path: root/linux-user/elfload.c
diff options
context:
space:
mode:
authormalc <av1474@comtv.ru>2009-07-18 13:12:20 +0400
committermalc <av1474@comtv.ru>2009-07-18 13:17:01 +0400
commit9fdca5aa5d966b0f66daeba91de59ce560fbc3a0 (patch)
tree17a533c377c8629018f54a06737567bfa597aad9 /linux-user/elfload.c
parent3efa9a672e4a5f7b2d35cf457ea277e997a0f8c6 (diff)
downloadfocaccia-qemu-9fdca5aa5d966b0f66daeba91de59ce560fbc3a0.tar.gz
focaccia-qemu-9fdca5aa5d966b0f66daeba91de59ce560fbc3a0.zip
Use correct byteswap routine for elf_note
All elf64_note structure members are Elf64_Word (which is 32bit value)
hence using bswaptls to byteswap it on 64bit platforms is incorrect.

Signed-off-by: malc <av1474@comtv.ru>
Diffstat (limited to 'linux-user/elfload.c')
-rw-r--r--linux-user/elfload.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 12d259834f..63d0ae4e90 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -798,9 +798,9 @@ static int elf_core_dump(int, const CPUState *);
 #ifdef BSWAP_NEEDED
 static void bswap_note(struct elf_note *en)
 {
-    bswaptls(&en->n_namesz);
-    bswaptls(&en->n_descsz);
-    bswaptls(&en->n_type);
+    bswap32s(&en->n_namesz);
+    bswap32s(&en->n_descsz);
+    bswap32s(&en->n_type);
 }
 #endif /* BSWAP_NEEDED */