aboutsummaryrefslogtreecommitdiff
path: root/elf_ops.h
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-17 23:07:31 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-10-17 23:07:31 +0000
commit82790064116b066531c8b61067509a0fd4169ee0 (patch)
tree3af63fc031eb29c8edfb0c688d5d63d82bc0afc7 /elf_ops.h
parent06c0b38830a47cadec4ddaec1788466bf9753d85 (diff)
downloadqemu-82790064116b066531c8b61067509a0fd4169ee0.zip
qemu-82790064116b066531c8b61067509a0fd4169ee0.tar.gz
qemu-82790064116b066531c8b61067509a0fd4169ee0.tar.bz2
Cast ELF datatypes properly to host 64bit types.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3407 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'elf_ops.h')
-rw-r--r--elf_ops.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/elf_ops.h b/elf_ops.h
index 173d12f..646a569 100644
--- a/elf_ops.h
+++ b/elf_ops.h
@@ -159,7 +159,7 @@ int glue(load_elf, SZ)(int fd, int64_t virt_to_phys_addend,
goto fail;
if (pentry)
- *pentry = (uint64_t)ehdr.e_entry;
+ *pentry = (uint64_t)(elf_sword)ehdr.e_entry;
glue(load_symbols, SZ)(&ehdr, fd, must_swab);
@@ -206,9 +206,9 @@ int glue(load_elf, SZ)(int fd, int64_t virt_to_phys_addend,
}
qemu_free(phdr);
if (lowaddr)
- *lowaddr = (uint64_t)low;
+ *lowaddr = (uint64_t)(elf_sword)low;
if (highaddr)
- *highaddr = (uint64_t)high;
+ *highaddr = (uint64_t)(elf_sword)high;
return total_size;
fail:
qemu_free(data);