Module Name: src Committed By: christos Date: Sun Nov 1 17:44:42 UTC 2015
Modified Files: src/sys/kern: exec_elf.c src/sys/sys: exec_elf.h Log Message: Ignore the ancient 01.01 tag that gnuc used to put in old NetBSD binaries. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/kern/exec_elf.c cvs rdiff -u -r1.150 -r1.151 src/sys/sys/exec_elf.h 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.79 src/sys/kern/exec_elf.c:1.80 --- src/sys/kern/exec_elf.c:1.79 Sun Nov 1 10:21:42 2015 +++ src/sys/kern/exec_elf.c Sun Nov 1 12:44:41 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.c,v 1.79 2015/11/01 15:21:42 christos Exp $ */ +/* $NetBSD: exec_elf.c,v 1.80 2015/11/01 17:44:41 christos 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.79 2015/11/01 15:21:42 christos Exp $"); +__KERNEL_RCSID(1, "$NetBSD: exec_elf.c,v 1.80 2015/11/01 17:44:41 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_pax.h" @@ -927,13 +927,20 @@ netbsd_elf_signature(struct lwp *l, stru } /* - * 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; Index: src/sys/sys/exec_elf.h diff -u src/sys/sys/exec_elf.h:1.150 src/sys/sys/exec_elf.h:1.151 --- src/sys/sys/exec_elf.h:1.150 Sun Nov 1 10:21:42 2015 +++ src/sys/sys/exec_elf.h Sun Nov 1 12:44:42 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: exec_elf.h,v 1.150 2015/11/01 15:21:42 christos Exp $ */ +/* $NetBSD: exec_elf.h,v 1.151 2015/11/01 17:44:42 christos Exp $ */ /*- * Copyright (c) 1994 The NetBSD Foundation, Inc. @@ -836,6 +836,11 @@ typedef struct { #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