added entry parameter to ELF loader

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1859 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2006-04-26 22:05:26 +00:00
parent 94ac515889
commit 9ee3c02942
5 changed files with 19 additions and 11 deletions

View file

@ -194,7 +194,8 @@ 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 virt_to_phys_addend,
uint64_t *pentry)
{
int fd, data_order, must_swab, ret;
uint8_t e_ident[EI_NIDENT];
@ -220,9 +221,9 @@ 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);
ret = load_elf64(fd, virt_to_phys_addend, must_swab, pentry);
} else {
ret = load_elf32(fd, virt_to_phys_addend, must_swab);
ret = load_elf32(fd, virt_to_phys_addend, must_swab, pentry);
}
close(fd);