Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/sys Use KERN_ELFSIZE if we are in the kernel.



details:   https://anonhg.NetBSD.org/src/rev/2e32634fe0ef
branches:  trunk
changeset: 357330:2e32634fe0ef
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Nov 06 03:50:33 2017 +0000

description:
Use KERN_ELFSIZE if we are in the kernel.

diffstat:

 sys/sys/exec_elf.h |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (25 lines):

diff -r 4df084726ec3 -r 2e32634fe0ef sys/sys/exec_elf.h
--- a/sys/sys/exec_elf.h        Mon Nov 06 03:50:13 2017 +0000
+++ b/sys/sys/exec_elf.h        Mon Nov 06 03:50:33 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_elf.h,v 1.156 2016/09/03 11:18:28 christos Exp $  */
+/*     $NetBSD: exec_elf.h,v 1.157 2017/11/06 03:50:33 christos Exp $  */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -1050,9 +1050,14 @@
 #define ELF_NOTE_MCMODEL_NAME          ELF_NOTE_NETBSD_NAME
 
 
-#if !defined(ELFSIZE) && defined(ARCH_ELFSIZE)
+#if !defined(ELFSIZE)
+#if defined(_KERNEL) && defined(KERN_ELFSIZE)
+#define ELFSIZE KERN_ELFSIZE
+#endif
+#if !defined(_KERNEL) && defined(ARCH_ELFSIZE)
 #define ELFSIZE ARCH_ELFSIZE
 #endif
+#endif
 
 #if defined(ELFSIZE)
 #define CONCAT(x,y)    __CONCAT(x,y)



Home | Main Index | Thread Index | Old Index