diff options
author | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-10-22 18:20:20 +0000 |
---|---|---|
committer | pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-10-22 18:20:20 +0000 |
commit | 83c1f87cc8f865f1f55a2e476cd827aa51089e8c (patch) | |
tree | d0e3668ef58d9947a49a2ea8a6946fdf14482d19 /elf_ops.h | |
parent | Optimize redundant cp15 coprocessor access control register writes. (diff) | |
download | qemu-kvm-83c1f87cc8f865f1f55a2e476cd827aa51089e8c.tar.gz qemu-kvm-83c1f87cc8f865f1f55a2e476cd827aa51089e8c.tar.bz2 qemu-kvm-83c1f87cc8f865f1f55a2e476cd827aa51089e8c.zip |
Use load address when loading ELF images.
Signed-off-by: Paul Brook <paul@codesourcery.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5513 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'elf_ops.h')
-rw-r--r-- | elf_ops.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -177,7 +177,7 @@ static int glue(load_symbols, SZ)(struct elfhdr *ehdr, int fd, int must_swab) return -1; } -static int glue(load_elf, SZ)(int fd, int64_t virt_to_phys_addend, +static int glue(load_elf, SZ)(int fd, int64_t address_offset, int must_swab, uint64_t *pentry, uint64_t *lowaddr, uint64_t *highaddr) { @@ -229,7 +229,9 @@ static int glue(load_elf, SZ)(int fd, int64_t virt_to_phys_addend, if (read(fd, data, ph->p_filesz) != ph->p_filesz) goto fail; } - addr = ph->p_vaddr + virt_to_phys_addend; + /* address_offset is hack for kernel images that are + linked at the wrong physical address. */ + addr = ph->p_paddr + address_offset; cpu_physical_memory_write_rom(addr, data, mem_size); |