e_entry can be smaller than a pointer. Cast it to an intptr_t before

casting it to a uint64_t *.
This commit is contained in:
Warner Losh 2017-12-03 04:55:04 +00:00
parent 2d35a371fc
commit 0a34fc542c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=326488

View file

@ -82,7 +82,7 @@ ppc64_ofw_elf_exec(struct preloaded_file *fp)
if ((e->e_flags & 3) == 2)
entry = e->e_entry;
else
entry = *(uint64_t *)e->e_entry;
entry = *(uint64_t *)(intptr_t)e->e_entry;
if ((error = md_load64(fp->f_args, &mdp, &dtbp)) != 0)
return (error);