loader: use correct types for parse_modmetadata

Use the proper types in parse_modmetadata for the p_start and p_end
parameters. This was causing problems in the ARM 32bit loader.

Sponsored by: Citrix Systems R&D
Reported and Tested by: ian
This commit is contained in:
Roger Pau Monné 2015-01-17 08:09:07 +00:00
parent 30696562d3
commit df560e4e96
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=277291

View File

@ -77,7 +77,7 @@ static int __elfN(lookup_symbol)(struct preloaded_file *mp, elf_file_t ef, const
static int __elfN(reloc_ptr)(struct preloaded_file *mp, elf_file_t ef,
Elf_Addr p, void *val, size_t len);
static int __elfN(parse_modmetadata)(struct preloaded_file *mp, elf_file_t ef,
u_int64_t p_start, u_int64_t p_end);
Elf_Addr p_start, Elf_Addr p_end);
static symaddr_fn __elfN(symaddr);
static char *fake_modname(const char *name);
@ -300,7 +300,7 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off)
Elf_Size size;
u_int fpcopy;
Elf_Sym sym;
u_int64_t p_start, p_end;
Elf_Addr p_start, p_end;
dp = NULL;
shdr = NULL;
@ -712,7 +712,7 @@ __elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest)
Elf_Shdr *sh_data[2];
char *shstrtab = NULL;
size_t size;
u_int64_t p_start, p_end;
Elf_Addr p_start, p_end;
bzero(&ef, sizeof(struct elf_file));
ef.fd = -1;
@ -820,7 +820,7 @@ __elfN(load_modmetadata)(struct preloaded_file *fp, u_int64_t dest)
int
__elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef,
u_int64_t p_start, u_int64_t p_end)
Elf_Addr p_start, Elf_Addr p_end)
{
struct mod_metadata md;
#if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64