Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 3 Dec 2017 04:55:04 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326488 - head/stand/ofw/libofw
Message-ID:  <201712030455.vB34t4D5056248@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712030455.vB34t4D5056248>