mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 12:53:53 -06:00
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
This commit is contained in:
parent
4be27dbbde
commit
83c1f87cc8
3 changed files with 8 additions and 6 deletions
6
loader.c
6
loader.c
|
@ -282,7 +282,7 @@ static void *load_at(int fd, int offset, int size)
|
|||
#include "elf_ops.h"
|
||||
|
||||
/* return < 0 if error, otherwise the number of bytes loaded in memory */
|
||||
int load_elf(const char *filename, int64_t virt_to_phys_addend,
|
||||
int load_elf(const char *filename, int64_t address_offset,
|
||||
uint64_t *pentry, uint64_t *lowaddr, uint64_t *highaddr)
|
||||
{
|
||||
int fd, data_order, host_data_order, must_swab, ret;
|
||||
|
@ -317,10 +317,10 @@ int load_elf(const char *filename, int64_t virt_to_phys_addend,
|
|||
|
||||
lseek(fd, 0, SEEK_SET);
|
||||
if (e_ident[EI_CLASS] == ELFCLASS64) {
|
||||
ret = load_elf64(fd, virt_to_phys_addend, must_swab, pentry,
|
||||
ret = load_elf64(fd, address_offset, must_swab, pentry,
|
||||
lowaddr, highaddr);
|
||||
} else {
|
||||
ret = load_elf32(fd, virt_to_phys_addend, must_swab, pentry,
|
||||
ret = load_elf32(fd, address_offset, must_swab, pentry,
|
||||
lowaddr, highaddr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue