ia64/xen-unstable

changeset 10585:d49e5cc672eb

Use address types in elf parser that match elf headers.
Necessary if a long is a different size to addresses in elf
file being parsed.
From: Jimi Xenidis <jimix@watson.ibm.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Jun 28 20:46:01 2006 +0100 (2006-06-28)
parents 4260eb8c0874
children bd4080876297
files tools/libxc/xc_load_elf.c xen/common/elf.c
line diff
     1.1 --- a/tools/libxc/xc_load_elf.c	Wed Jun 28 18:17:41 2006 +0100
     1.2 +++ b/tools/libxc/xc_load_elf.c	Wed Jun 28 20:46:01 2006 +0100
     1.3 @@ -68,7 +68,7 @@ static int parseelfimage(const char *ima
     1.4      Elf_Ehdr *ehdr = (Elf_Ehdr *)image;
     1.5      Elf_Phdr *phdr;
     1.6      Elf_Shdr *shdr;
     1.7 -    unsigned long kernstart = ~0UL, kernend=0UL, vaddr, virt_base, elf_pa_off;
     1.8 +    Elf_Addr kernstart = ~0, kernend = 0, vaddr, virt_base, elf_pa_off;
     1.9      const char *shstrtab;
    1.10      char *guestinfo=NULL, *p;
    1.11      int h, virt_base_defined, elf_pa_off_defined;
     2.1 --- a/xen/common/elf.c	Wed Jun 28 18:17:41 2006 +0100
     2.2 +++ b/xen/common/elf.c	Wed Jun 28 20:46:01 2006 +0100
     2.3 @@ -23,7 +23,7 @@ int parseelfimage(struct domain_setup_in
     2.4      Elf_Ehdr *ehdr = (Elf_Ehdr *)dsi->image_addr;
     2.5      Elf_Phdr *phdr;
     2.6      Elf_Shdr *shdr;
     2.7 -    unsigned long kernstart = ~0UL, kernend=0UL, vaddr, virt_base, elf_pa_off;
     2.8 +    Elf_Addr kernstart = ~0, kernend = 0, vaddr, virt_base, elf_pa_off;
     2.9      char *shstrtab, *guestinfo=NULL, *p;
    2.10      char *elfbase = (char *)dsi->image_addr;
    2.11      int h, virt_base_defined, elf_pa_off_defined;