Source-Changes-HG archive

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

[src/trunk]: src/sys/kern don't produce diagnostics for GNU tags



details:   https://anonhg.NetBSD.org/src/rev/4c8c429d10a7
branches:  trunk
changeset: 767484:4c8c429d10a7
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jul 19 19:45:36 2011 +0000

description:
don't produce diagnostics for GNU tags

diffstat:

 sys/kern/exec_elf.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 4c8deffab785 -r 4c8c429d10a7 sys/kern/exec_elf.c
--- a/sys/kern/exec_elf.c       Tue Jul 19 19:42:27 2011 +0000
+++ b/sys/kern/exec_elf.c       Tue Jul 19 19:45:36 2011 +0000
@@ -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",



Home | Main Index | Thread Index | Old Index