summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-04-30 22:05:48 +0000
committerpeter <peter@FreeBSD.org>2003-04-30 22:05:48 +0000
commit6b137c3266ea8c3893a18ba041f5a9a22123e746 (patch)
treee23f8c3eaf1bcdd1dd881fd2d95c005fc9533284 /sys
parent47e12d9503a5bdb95811dc7295bf5f8f3bb94155 (diff)
downloadFreeBSD-src-6b137c3266ea8c3893a18ba041f5a9a22123e746.zip
FreeBSD-src-6b137c3266ea8c3893a18ba041f5a9a22123e746.tar.gz
Look for an elf32 kernel (powerpc) and elf64 kernel (sparc64) as well
as a plain "elf kernel".
Diffstat (limited to 'sys')
-rw-r--r--sys/powerpc/aim/machdep.c4
-rw-r--r--sys/powerpc/powerpc/machdep.c4
-rw-r--r--sys/sparc64/sparc64/machdep.c4
3 files changed, 9 insertions, 3 deletions
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c
index 81fb604..4bce713 100644
--- a/sys/powerpc/aim/machdep.c
+++ b/sys/powerpc/aim/machdep.c
@@ -267,7 +267,9 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp)
*/
if (mdp != NULL) {
preload_metadata = mdp;
- kmdp = preload_search_by_type("elf kernel");
+ kmdp = preload_search_by_type("elf32 kernel");
+ if (kmdp != NULL)
+ kmdp = preload_search_by_type("elf kernel");
if (kmdp != NULL) {
boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int);
kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *);
diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c
index 81fb604..4bce713 100644
--- a/sys/powerpc/powerpc/machdep.c
+++ b/sys/powerpc/powerpc/machdep.c
@@ -267,7 +267,9 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp)
*/
if (mdp != NULL) {
preload_metadata = mdp;
- kmdp = preload_search_by_type("elf kernel");
+ kmdp = preload_search_by_type("elf32 kernel");
+ if (kmdp != NULL)
+ kmdp = preload_search_by_type("elf kernel");
if (kmdp != NULL) {
boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int);
kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *);
diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c
index 6cf0f6a..219da76 100644
--- a/sys/sparc64/sparc64/machdep.c
+++ b/sys/sparc64/sparc64/machdep.c
@@ -242,7 +242,9 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec)
*/
if (mdp != NULL) {
preload_metadata = mdp;
- kmdp = preload_search_by_type("elf kernel");
+ kmdp = preload_search_by_type("elf64 kernel");
+ if (kmdp != NULL)
+ kmdp = preload_search_by_type("elf kernel");
if (kmdp != NULL) {
boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int);
kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *);
OpenPOWER on IntegriCloud