Date: Sat, 15 Sep 2012 17:47:44 +0000 (UTC) From: Andreas Tobler <andreast@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r240533 - stable/9/sys/boot/common Message-ID: <201209151747.q8FHlikD098964@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209151747.q8FHlikD098964>