svn commit: r326488 - head/stand/ofw/libofw

Warner Losh imp at FreeBSD.org
Sun Dec 3 04:55:06 UTC 2017


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);


More information about the svn-src-head mailing list