[Midnightbsd-cvs] src [8062] trunk/sys/boot/common/load_elf.c: kernel module load fixes

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Sep 15 17:40:49 EDT 2016


Revision: 8062
          http://svnweb.midnightbsd.org/src/?rev=8062
Author:   laffer1
Date:     2016-09-15 17:40:49 -0400 (Thu, 15 Sep 2016)
Log Message:
-----------
kernel module load fixes

Modified Paths:
--------------
    trunk/sys/boot/common/load_elf.c

Modified: trunk/sys/boot/common/load_elf.c
===================================================================
--- trunk/sys/boot/common/load_elf.c	2016-09-15 21:39:21 UTC (rev 8061)
+++ trunk/sys/boot/common/load_elf.c	2016-09-15 21:40:49 UTC (rev 8062)
@@ -588,7 +588,7 @@
     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 @@
 __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 @@
 	    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 Midnightbsd-cvs mailing list