diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-11-30 05:19:21 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-11-30 05:19:21 +0000 |
commit | feebd111ddd2c056aaf1d298579fa7c2335065bb (patch) | |
tree | e2da801da863a771a865a59998c303f8b92b842b /sys/arch/sgi/include | |
parent | ad09fdc7ec83e11cbd34700b0c24c204bbc05cdb (diff) |
Use the new Elfxx_Phdr check hook to prevent loading a kernel not compiled
for the platform we are running on (i.e. trying to boot e.g. bsd.IP32 on an
IP27 machine).
Diffstat (limited to 'sys/arch/sgi/include')
-rw-r--r-- | sys/arch/sgi/include/loadfile_machdep.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/sgi/include/loadfile_machdep.h b/sys/arch/sgi/include/loadfile_machdep.h index 85b30239159..5bdbd672515 100644 --- a/sys/arch/sgi/include/loadfile_machdep.h +++ b/sys/arch/sgi/include/loadfile_machdep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: loadfile_machdep.h,v 1.3 2008/06/26 05:42:12 ray Exp $ */ +/* $OpenBSD: loadfile_machdep.h,v 1.4 2009/11/30 05:19:18 miod Exp $ */ /* $NetBSD: loadfile_machdep.h,v 1.2 2001/10/31 17:20:49 thorpej Exp $ */ /*- @@ -47,4 +47,6 @@ #define PROGRESS(a) (void) printf a #define ALLOC(a) alloc(a) #define FREE(a, b) free(a, b) -#define OKMAGIC(a) ((a) == OMAGIC) + +extern int check_phdr(void *); +#define CHECK_PHDR(sz,phdr) check_phdr(phdr) |