Author: imp
Date: Sun Dec  3 04:55:04 2017
New Revision: 326488
URL: https://svnweb.freebsd.org/changeset/base/326488

Log:
  e_entry can be smaller than a pointer. Cast it to an intptr_t before
  casting it to a uint64_t *.

Modified:
  head/stand/ofw/libofw/ppc64_elf_freebsd.c

Modified: head/stand/ofw/libofw/ppc64_elf_freebsd.c
==============================================================================
--- head/stand/ofw/libofw/ppc64_elf_freebsd.c   Sun Dec  3 04:54:59 2017        
(r326487)
+++ head/stand/ofw/libofw/ppc64_elf_freebsd.c   Sun Dec  3 04:55:04 2017        
(r326488)
@@ -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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to