Source-Changes-HG archive

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

[src/netbsd-7]: src/sys Pull up following revision(s) (requested by christos ...



details:   https://anonhg.NetBSD.org/src/rev/cca871bc0b8f
branches:  netbsd-7
changeset: 799682:cca871bc0b8f
user:      riz <riz%NetBSD.org@localhost>
date:      Sun Nov 08 00:57:09 2015 +0000

description:
Pull up following revision(s) (requested by christos in ticket #1019):
        sys/kern/exec_elf.c: revision 1.79
        sys/sys/exec_elf.h: revision 1.150
        sys/sys/exec_elf.h: revision 1.151
        sys/kern/exec_elf.c: revision 1.80
Ignore the ancient 01.01 tag that gnuc used to put in old NetBSD binaries.
Add buildid Go note

diffstat:

 sys/kern/exec_elf.c |  18 ++++++++++++++----
 sys/sys/exec_elf.h  |  19 ++++++++++++++++++-
 2 files changed, 32 insertions(+), 5 deletions(-)

diffs (91 lines):

diff -r 0d58a99750b6 -r cca871bc0b8f sys/kern/exec_elf.c
--- a/sys/kern/exec_elf.c       Sun Nov 08 00:55:11 2015 +0000
+++ b/sys/kern/exec_elf.c       Sun Nov 08 00:57:09 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_elf.c,v 1.69.2.2 2015/03/29 09:07:55 martin Exp $ */
+/*     $NetBSD: exec_elf.c,v 1.69.2.3 2015/11/08 00:57:09 riz 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.69.2.2 2015/03/29 09:07:55 martin Exp $");
+__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.69.2.3 2015/11/08 00:57:09 riz Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pax.h"
@@ -939,13 +939,20 @@
                        }
 
                        /*
-                        * Ignore SuSE tags; SuSE's n_type is the same as NetBSD's
-                        * one.
+                        * Ignore SuSE tags; SuSE's n_type is the same the
+                        * NetBSD one.
                         */
                        if (np->n_namesz == ELF_NOTE_SUSE_NAMESZ &&
                            memcmp(ndata, ELF_NOTE_SUSE_NAME,
                            ELF_NOTE_SUSE_NAMESZ) == 0)
                                break;
+                       /*
+                        * Ignore old GCC
+                        */
+                       if (np->n_namesz == ELF_NOTE_OGCC_NAMESZ &&
+                           memcmp(ndata, ELF_NOTE_OGCC_NAME,
+                           ELF_NOTE_OGCC_NAMESZ) == 0)
+                               break;
                        BADNOTE("NetBSD tag");
                        goto bad;
 
@@ -1004,6 +1011,9 @@
                case ELF_NOTE_TYPE_SUSE_VERSION_TAG:
                        break;
 
+               case ELF_NOTE_TYPE_GO_BUILDID_TAG:
+                       break;
+
                default:
                        BADNOTE("unknown tag");
 bad:
diff -r 0d58a99750b6 -r cca871bc0b8f sys/sys/exec_elf.h
--- a/sys/sys/exec_elf.h        Sun Nov 08 00:55:11 2015 +0000
+++ b/sys/sys/exec_elf.h        Sun Nov 08 00:57:09 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_elf.h,v 1.141 2014/07/08 17:16:25 maxv Exp $      */
+/*     $NetBSD: exec_elf.h,v 1.141.2.1 2015/11/08 00:57:09 riz Exp $   */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -822,6 +822,11 @@
 #define ELF_NOTE_ABI_OS_KFREEBSD       3
 #define ELF_NOTE_ABI_OS_KNETBSD                4
 
+/* Old gcc style, under the ABI tag */
+#define ELF_NOTE_OGCC_NAMESZ           8
+#define ELF_NOTE_OGCC_NAME             "01.01\0\0\0\0"
+#define ELF_NOTE_OGCC_DESCSZ           0
+
 /*
  * GNU-specific note type: Hardware capabilities
  * name: GNU\0
@@ -881,6 +886,18 @@
 /* SuSE-specific note name */
 #define ELF_NOTE_SUSE_VERSION_NAME             "SuSE\0\0\0\0"
 
+/* Go-specific note type: buildid
+ * name: Go\0\0
+ * namesz: 4
+ * desc: 
+ *     words[10]
+ * descsz: 40
+ */
+#define ELF_NOTE_TYPE_GO_BUILDID_TAG   4
+#define ELF_NOTE_GO_BUILDID_NAMESZ     4
+#define ELF_NOTE_GO_BUILDID_DESCSZ     40
+#define ELF_NOTE_GO_BUILDID_NAME       "Go\0\0"
+
 /* NetBSD-specific note type: Emulation name.
  * name: NetBSD\0\0
  * namesz: 8



Home | Main Index | Thread Index | Old Index