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>
This commit is contained in:
malc 2009-07-18 13:12:20 +04:00
parent 3efa9a672e
commit 9fdca5aa5d
1 changed files with 3 additions and 3 deletions

View File

@ -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 */