summaryrefslogtreecommitdiffstats
path: root/sys/boot/common
diff options
context:
space:
mode:
authorandreast <andreast@FreeBSD.org>2012-09-08 20:00:31 +0000
committerandreast <andreast@FreeBSD.org>2012-09-08 20:00:31 +0000
commitda0d98252eb8cd7f1a2786f7e73fc0e8648860a8 (patch)
treefef81ab1c5f331ef7e4e767b5c33602c870da2db /sys/boot/common
parent88d12193245226f68a1dd6e205834fa65d91a6e6 (diff)
downloadFreeBSD-src-da0d98252eb8cd7f1a2786f7e73fc0e8648860a8.zip
FreeBSD-src-da0d98252eb8cd7f1a2786f7e73fc0e8648860a8.tar.gz
Fix loading of kernel modules at boot time for powerpc64.
Reported by: Mathias Breuninger MFC after: 1 week
Diffstat (limited to 'sys/boot/common')
-rw-r--r--sys/boot/common/load_elf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/boot/common/load_elf.c b/sys/boot/common/load_elf.c
index 019307e..e1e6de7 100644
--- a/sys/boot/common/load_elf.c
+++ b/sys/boot/common/load_elf.c
@@ -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 preloaded_file *fp, elf_file_t ef)
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) {
OpenPOWER on IntegriCloud