svn commit: r240533 - stable/9/sys/boot/common

Andreas Tobler andreast at FreeBSD.org
Sat Sep 15 17:47:45 UTC 2012


Author: andreast
Date: Sat Sep 15 17:47:44 2012
New Revision: 240533
URL: http://svn.freebsd.org/changeset/base/240533

Log:
  MFC: r240249
  Fix loading of kernel modules at boot time for powerpc64.
  
  Reported by:	Mathias Breuninger

Modified:
  stable/9/sys/boot/common/load_elf.c

Modified: stable/9/sys/boot/common/load_elf.c
==============================================================================
--- stable/9/sys/boot/common/load_elf.c	Sat Sep 15 17:32:19 2012	(r240532)
+++ stable/9/sys/boot/common/load_elf.c	Sat Sep 15 17:47:44 2012	(r240533)
@@ -588,7 +588,7 @@ fake_modname(const char *name)
     return fp;
 }
 
-#if defined(__i386__) && __ELF_WORD_SIZE == 64
+#if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64
 struct mod_metadata64 {
 	int		md_version;	/* structure version MDTV_* */  
 	int		md_type;	/* type of entry MDT_* */
@@ -601,7 +601,7 @@ int
 __elfN(parse_modmetadata)(struct preloaded_file *fp, elf_file_t ef)
 {
     struct mod_metadata md;
-#if defined(__i386__) && __ELF_WORD_SIZE == 64
+#if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64
     struct mod_metadata64 md64;
 #endif
     struct mod_depend *mdepend;
@@ -626,7 +626,7 @@ __elfN(parse_modmetadata)(struct preload
 	    v += ef->off;
 	else if (error != 0)
 	    return (error);
-#if defined(__i386__) && __ELF_WORD_SIZE == 64
+#if (defined(__i386__) || defined(__powerpc__)) && __ELF_WORD_SIZE == 64
 	COPYOUT(v, &md64, sizeof(md64));
 	error = __elfN(reloc_ptr)(fp, ef, v, &md64, sizeof(md64));
 	if (error == EOPNOTSUPP) {


More information about the svn-src-stable-9 mailing list