aboutsummaryrefslogtreecommitdiff
path: root/loader.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-04-26 22:05:26 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-04-26 22:05:26 +0000
commit9ee3c029425a20ed16831c92c4cb3e192a909a61 (patch)
treee0e3273a5c80f8ab35a1073c0582a4b38161ff8e /loader.c
parent94ac51588972366287fa359a1e7d37b5e08f9bef (diff)
downloadqemu-9ee3c029425a20ed16831c92c4cb3e192a909a61.zip
qemu-9ee3c029425a20ed16831c92c4cb3e192a909a61.tar.gz
qemu-9ee3c029425a20ed16831c92c4cb3e192a909a61.tar.bz2
added entry parameter to ELF loader
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1859 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'loader.c')
-rw-r--r--loader.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/loader.c b/loader.c
index c4bde55..b2d6423 100644
--- a/loader.c
+++ b/loader.c
@@ -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);