Module Name:    src
Committed By:   christos
Date:           Tue Jul 19 19:45:36 UTC 2011

Modified Files:
        src/sys/kern: exec_elf.c

Log Message:
don't produce diagnostics for GNU tags


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 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.29 src/sys/kern/exec_elf.c:1.30
--- src/sys/kern/exec_elf.c:1.29	Mon Mar  7 00:09:12 2011
+++ src/sys/kern/exec_elf.c	Tue Jul 19 15:45:36 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec_elf.c,v 1.29 2011/03/07 05:09:12 joerg Exp $	*/
+/*	$NetBSD: exec_elf.c,v 1.30 2011/07/19 19:45:36 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.29 2011/03/07 05:09:12 joerg Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.30 2011/07/19 19:45:36 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pax.h"
@@ -885,6 +885,13 @@
 			    memcmp(ndata, ELF_NOTE_PAX_NAME,
 			    ELF_NOTE_PAX_NAMESZ)) {
 bad:
+			    /*
+			     * Ignore GNU tags
+			     */
+			    if (np->n_namesz == ELF_NOTE_GNU_NAMESZ &&
+				memcmp(ndata, ELF_NOTE_GNU_NAME,
+				ELF_NOTE_GNU_NAMESZ) == 0)
+					break;
 #ifdef DIAGNOSTIC
 				printf("%s: bad tag %d: "
 				    "[%d %d, %d %d, %*.*s %*.*s]\n",

Reply via email to