Module Name: src
Committed By: christos
Date: Sat Jun 2 16:48:13 UTC 2012
Modified Files:
src/sys/kern: exec_elf.c
Log Message:
the gnu tag name is valid for both type 1 (abi) and type 3 (build id)
To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/kern/exec_elf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/exec_elf.c
diff -u src/sys/kern/exec_elf.c:1.39 src/sys/kern/exec_elf.c:1.40
--- src/sys/kern/exec_elf.c:1.39 Mon May 21 22:40:05 2012
+++ src/sys/kern/exec_elf.c Sat Jun 2 12:48:13 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_elf.c,v 1.39 2012/05/22 02:40:05 christos Exp $ */
+/* $NetBSD: exec_elf.c,v 1.40 2012/06/02 16:48:13 christos Exp $ */
/*-
* Copyright (c) 1994, 2000, 2005 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.39 2012/05/22 02:40:05 christos Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.40 2012/06/02 16:48:13 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_pax.h"
@@ -908,13 +908,6 @@ netbsd_elf_signature(struct lwp *l, stru
break;
}
/*
- * Ignore GNU tags
- */
- if (np->n_namesz == ELF_NOTE_GNU_NAMESZ &&
- memcmp(ndata, ELF_NOTE_GNU_NAME,
- ELF_NOTE_GNU_NAMESZ) == 0)
- break;
- /*
* Ignore SuSE tags
*/
if (np->n_namesz == ELF_NOTE_SUSE_NAMESZ &&
@@ -934,6 +927,12 @@ netbsd_elf_signature(struct lwp *l, stru
bad:
#ifdef DIAGNOSTIC
{
+ /*
+ * Ignore GNU tags
+ */
+ if (np->n_namesz == ELF_NOTE_GNU_NAMESZ &&
+ memcmp(ndata, ELF_NOTE_GNU_NAME,
+ ELF_NOTE_GNU_NAMESZ) == 0)
int ns = MIN(np->n_namesz, maxlen);
printf("%s: Unknown elf note type %d: "
"[namesz=%d, descsz=%d name=%*.*s]\n",