The LOAD_TEXTA flag is required when loading a.out kernels.
Also add some non-standalone versions for the benefit of installboot(8).
This commit is contained in:
parent
c28723715c
commit
b29bcb645b
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: loadfile_machdep.h,v 1.1 2000/11/30 21:20:43 scw Exp $ */
|
/* $NetBSD: loadfile_machdep.h,v 1.2 2000/12/04 18:41:51 scw Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||||
|
@ -43,14 +43,17 @@
|
||||||
#define BOOT_ELF
|
#define BOOT_ELF
|
||||||
#define ELFSIZE 32
|
#define ELFSIZE 32
|
||||||
|
|
||||||
#define LOAD_KERNEL (LOAD_ALL & ~LOAD_TEXTA)
|
#define LOAD_KERNEL LOAD_ALL
|
||||||
#define COUNT_KERNEL (COUNT_ALL & ~COUNT_TEXTA)
|
#define COUNT_KERNEL COUNT_ALL
|
||||||
|
|
||||||
#define LOADADDR(a) (((u_long)(a)) + offset)
|
#define LOADADDR(a) (((u_long)(a)) + offset)
|
||||||
#define ALIGNENTRY(a) ((u_long)(a))
|
#define ALIGNENTRY(a) ((u_long)(a))
|
||||||
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
|
#define READ(f, b, c) read((f), (void *)LOADADDR(b), (c))
|
||||||
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
|
#define BCOPY(s, d, c) memcpy((void *)LOADADDR(d), (void *)(s), (c))
|
||||||
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
|
#define BZERO(d, c) memset((void *)LOADADDR(d), 0, (c))
|
||||||
|
|
||||||
|
#ifdef _STANDALONE
|
||||||
|
|
||||||
#define WARN(a) (void)(printf a, \
|
#define WARN(a) (void)(printf a, \
|
||||||
printf((errno ? ": %s\n" : "\n"), \
|
printf((errno ? ": %s\n" : "\n"), \
|
||||||
strerror(errno)))
|
strerror(errno)))
|
||||||
|
@ -59,4 +62,14 @@
|
||||||
#define FREE(a, b) free(a, b)
|
#define FREE(a, b) free(a, b)
|
||||||
#define OKMAGIC(a) ((a) == NMAGIC)
|
#define OKMAGIC(a) ((a) == NMAGIC)
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define WARN(a) warn a
|
||||||
|
#define PROGRESS(a) /* nothing */
|
||||||
|
#define ALLOC(a) malloc(a)
|
||||||
|
#define FREE(a, b) free(a)
|
||||||
|
#define OKMAGIC(a) ((a) == OMAGIC)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __MACHINE_LOADFILE_MACHDEP_H */
|
#endif /* __MACHINE_LOADFILE_MACHDEP_H */
|
||||||
|
|
Loading…
Reference in New Issue