Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Enhance verbosity of debug message for ELF magic mi...
details: https://anonhg.NetBSD.org/src/rev/2aac1cd536a3
branches: trunk
changeset: 353134:2aac1cd536a3
user: kamil <kamil%NetBSD.org@localhost>
date: Fri Apr 21 13:17:42 2017 +0000
description:
Enhance verbosity of debug message for ELF magic mismatch
Print e_ident[EI_MAG3] (it was missed)
Print e_ident[EI_CLASS] as it is used do determine correct ELF magic.
No functional change for non-debug (without option DEBUG_ELF) build.
diffstat:
sys/kern/exec_elf.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 1b74379e5706 -r 2aac1cd536a3 sys/kern/exec_elf.c
--- a/sys/kern/exec_elf.c Fri Apr 21 12:43:22 2017 +0000
+++ b/sys/kern/exec_elf.c Fri Apr 21 13:17:42 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf.c,v 1.89 2017/02/18 01:29:09 chs Exp $ */
+/* $NetBSD: exec_elf.c,v 1.90 2017/04/21 13:17:42 kamil Exp $ */
/*-
* Copyright (c) 1994, 2000, 2005, 2015 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.89 2017/02/18 01:29:09 chs Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.90 2017/04/21 13:17:42 kamil Exp $");
#ifdef _KERNEL_OPT
#include "opt_pax.h"
@@ -271,8 +271,10 @@
if (memcmp(eh->e_ident, ELFMAG, SELFMAG) != 0 ||
eh->e_ident[EI_CLASS] != ELFCLASS) {
- DPRINTF("bad magic %#x%x%x", eh->e_ident[0], eh->e_ident[1],
- eh->e_ident[2]);
+ DPRINTF("bad magic e_ident[EI_MAG0,EI_MAG3] %#x%x%x%x, "
+ "e_ident[EI_CLASS] %#x", eh->e_ident[EI_MAG0],
+ eh->e_ident[EI_MAG1], eh->e_ident[EI_MAG2],
+ eh->e_ident[EI_MAG3], eh->e_ident[EI_CLASS]);
return ENOEXEC;
}
Home |
Main Index |
Thread Index |
Old Index