CVS commit: src/tests/libexec/ld.elf_so/helper_ifunc_dso

2021-06-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Jun  4 15:37:48 UTC 2021

Modified Files:
src/tests/libexec/ld.elf_so/helper_ifunc_dso: h_helper_ifunc.c

Log Message:
PR/56230: Don't try to use ifunc with arm and oabi


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 \
src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c
diff -u src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.8 src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.9
--- src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.8	Tue May  5 16:47:14 2020
+++ src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c	Fri Jun  4 11:37:48 2021
@@ -31,9 +31,9 @@
 #include 
 
 /*
- * Not supported on hppa
+ * Not supported on hppa or on arm with oabi
  */
-#if !defined(__hppa__)
+#if !defined(__hppa__) && !(defined(__arm__) && !defined(__ARM_EABI__))
 
 static long long
 ifunc1(void)



CVS commit: src/tests/libexec/ld.elf_so

2021-05-29 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sun May 30 02:26:51 UTC 2021

Modified Files:
src/tests/libexec/ld.elf_so: Makefile Makefile.inc

Log Message:
Drop explicit -msecure-plt, it's the default for both clang and gcc.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/tests/libexec/ld.elf_so/Makefile
cvs rdiff -u -r1.2 -r1.3 src/tests/libexec/ld.elf_so/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/Makefile
diff -u src/tests/libexec/ld.elf_so/Makefile:1.11 src/tests/libexec/ld.elf_so/Makefile:1.12
--- src/tests/libexec/ld.elf_so/Makefile:1.11	Tue Sep 22 01:09:32 2020
+++ src/tests/libexec/ld.elf_so/Makefile	Sun May 30 02:26:51 2021
@@ -1,9 +1,8 @@
-# $NetBSD: Makefile,v 1.11 2020/09/22 01:09:32 kamil Exp $
+# $NetBSD: Makefile,v 1.12 2021/05/30 02:26:51 joerg Exp $
 #
 
 NOMAN=		# defined
 
-.include "Makefile.inc"
 .include 
 
 .if ${MKPIC} != "no"

Index: src/tests/libexec/ld.elf_so/Makefile.inc
diff -u src/tests/libexec/ld.elf_so/Makefile.inc:1.2 src/tests/libexec/ld.elf_so/Makefile.inc:1.3
--- src/tests/libexec/ld.elf_so/Makefile.inc:1.2	Tue May 14 19:07:07 2019
+++ src/tests/libexec/ld.elf_so/Makefile.inc	Sun May 30 02:26:51 2021
@@ -1,5 +1 @@
 .include "../Makefile.inc"
-
-.if ${MACHINE_ARCH} == "powerpc"
-CFLAGS	+= -msecure-plt
-.endif



CVS commit: src/tests/libexec/ld.elf_so

2020-09-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep 29 16:35:42 UTC 2020

Modified Files:
src/tests/libexec/ld.elf_so: t_rtld_r_debug.c

Log Message:
Whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/libexec/ld.elf_so/t_rtld_r_debug.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/t_rtld_r_debug.c
diff -u src/tests/libexec/ld.elf_so/t_rtld_r_debug.c:1.2 src/tests/libexec/ld.elf_so/t_rtld_r_debug.c:1.3
--- src/tests/libexec/ld.elf_so/t_rtld_r_debug.c:1.2	Tue Sep 29 16:34:07 2020
+++ src/tests/libexec/ld.elf_so/t_rtld_r_debug.c	Tue Sep 29 16:35:42 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_rtld_r_debug.c,v 1.2 2020/09/29 16:34:07 roy Exp $	*/
+/*	$NetBSD: t_rtld_r_debug.c,v 1.3 2020/09/29 16:35:42 roy Exp $	*/
 
 /*
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@ getauxval(unsigned int type)
 	const AuxInfo *aux;
 
 	for (aux = _dlauxinfo(); aux->a_type != AT_NULL; ++aux) {
-		if (type == aux->a_type)  
+		if (type == aux->a_type)
 			return aux->a_v;
 	}
 
@@ -67,11 +67,11 @@ get_dynamic_section(void)
 	dynphdr = NULL;
 
 	for (; phdr < phlimit; ++phdr) {
-if (phdr->p_type == PT_DYNAMIC)
-dynphdr = phdr;   
-if (phdr->p_type == PT_PHDR)
-relocbase = (uintptr_t)phdr - phdr->p_vaddr;
-}
+		if (phdr->p_type == PT_DYNAMIC)
+			dynphdr = phdr;
+		if (phdr->p_type == PT_PHDR)
+			relocbase = (uintptr_t)phdr - phdr->p_vaddr;
+	}
 
 	return (Elf_Dyn *)((uint8_t *)dynphdr->p_vaddr + relocbase);
 }



CVS commit: src/tests/libexec/ld.elf_so

2020-09-29 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Sep 29 16:34:08 UTC 2020

Modified Files:
src/tests/libexec/ld.elf_so: t_rtld_r_debug.c

Log Message:
Fix build with clang.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/libexec/ld.elf_so/t_rtld_r_debug.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/t_rtld_r_debug.c
diff -u src/tests/libexec/ld.elf_so/t_rtld_r_debug.c:1.1 src/tests/libexec/ld.elf_so/t_rtld_r_debug.c:1.2
--- src/tests/libexec/ld.elf_so/t_rtld_r_debug.c:1.1	Tue Sep 22 01:09:32 2020
+++ src/tests/libexec/ld.elf_so/t_rtld_r_debug.c	Tue Sep 29 16:34:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_rtld_r_debug.c,v 1.1 2020/09/22 01:09:32 kamil Exp $	*/
+/*	$NetBSD: t_rtld_r_debug.c,v 1.2 2020/09/29 16:34:07 roy Exp $	*/
 
 /*
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -79,7 +79,7 @@ get_dynamic_section(void)
 static struct r_debug *
 get_rtld_r_debug(void)
 {
-	struct r_debug *debug;
+	struct r_debug *debug = NULL;
 	Elf_Dyn *dynp;
 
 	for (dynp = get_dynamic_section(); dynp->d_tag != DT_NULL; dynp++) {



CVS commit: src/tests/libexec/ld.elf_so

2020-05-05 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Tue May  5 20:47:14 UTC 2020

Modified Files:
src/tests/libexec/ld.elf_so: h_ifunc.c
src/tests/libexec/ld.elf_so/helper_ifunc_dso: h_helper_ifunc.c

Log Message:
Disable attempt to use ifunc on hppa.  It doesn't work and new binutils
throws a build error.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/libexec/ld.elf_so/h_ifunc.c
cvs rdiff -u -r1.7 -r1.8 \
src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/h_ifunc.c
diff -u src/tests/libexec/ld.elf_so/h_ifunc.c:1.2 src/tests/libexec/ld.elf_so/h_ifunc.c:1.3
--- src/tests/libexec/ld.elf_so/h_ifunc.c:1.2	Fri Mar  9 20:15:03 2018
+++ src/tests/libexec/ld.elf_so/h_ifunc.c	Tue May  5 20:47:14 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_ifunc.c,v 1.2 2018/03/09 20:15:03 joerg Exp $	*/
+/*	$NetBSD: h_ifunc.c,v 1.3 2020/05/05 20:47:14 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -39,5 +39,12 @@ main(int argc, char **argv)
 
 	if (argc != 2)
 		return 1;
+/*
+ * Not supported on hppa
+ */
+#if defined(__hppa__)
+	return 1;
+#else
 	return ifunc() != atoll(argv[1]);
+#endif
 }

Index: src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c
diff -u src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.7 src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.8
--- src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.7	Fri Mar  9 20:15:03 2018
+++ src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c	Tue May  5 20:47:14 2020
@@ -30,6 +30,11 @@
 #include 
 #include 
 
+/*
+ * Not supported on hppa
+ */
+#if !defined(__hppa__)
+
 static long long
 ifunc1(void)
 {
@@ -73,3 +78,4 @@ long long (*ifunc_indirect(void))(void)
 {
 	return ifunc_hidden;
 }
+#endif



CVS commit: src/tests/libexec/ld.elf_so

2018-03-09 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Mar  9 20:15:03 UTC 2018

Modified Files:
src/tests/libexec/ld.elf_so: h_ifunc.c t_ifunc.c
src/tests/libexec/ld.elf_so/helper_ifunc_dso: h_helper_ifunc.c

Log Message:
Avoid casting fun by switching ifunc helper functions to return
long long. Dead beef is too useful to switch to a different constant.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/libexec/ld.elf_so/h_ifunc.c
cvs rdiff -u -r1.7 -r1.8 src/tests/libexec/ld.elf_so/t_ifunc.c
cvs rdiff -u -r1.6 -r1.7 \
src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/h_ifunc.c
diff -u src/tests/libexec/ld.elf_so/h_ifunc.c:1.1 src/tests/libexec/ld.elf_so/h_ifunc.c:1.2
--- src/tests/libexec/ld.elf_so/h_ifunc.c:1.1	Mon Aug 25 20:40:53 2014
+++ src/tests/libexec/ld.elf_so/h_ifunc.c	Fri Mar  9 20:15:03 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_ifunc.c,v 1.1 2014/08/25 20:40:53 joerg Exp $	*/
+/*	$NetBSD: h_ifunc.c,v 1.2 2018/03/09 20:15:03 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 
-extern int ifunc(void);
+extern long long ifunc(void);
 
 int
 main(int argc, char **argv)
@@ -39,5 +39,5 @@ main(int argc, char **argv)
 
 	if (argc != 2)
 		return 1;
-	return ifunc() != atoi(argv[1]);
+	return ifunc() != atoll(argv[1]);
 }

Index: src/tests/libexec/ld.elf_so/t_ifunc.c
diff -u src/tests/libexec/ld.elf_so/t_ifunc.c:1.7 src/tests/libexec/ld.elf_so/t_ifunc.c:1.8
--- src/tests/libexec/ld.elf_so/t_ifunc.c:1.7	Mon Jan  1 06:34:13 2018
+++ src/tests/libexec/ld.elf_so/t_ifunc.c	Fri Mar  9 20:15:03 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ifunc.c,v 1.7 2018/01/01 06:34:13 maya Exp $	*/
+/*	$NetBSD: t_ifunc.c,v 1.8 2018/03/09 20:15:03 joerg Exp $	*/
 
 /*
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -53,12 +53,12 @@ ATF_TC_BODY(rtld_ifunc, tc)
 	const char *envstr[] = {
 	"0", "1"
 	};
-	int expected_result[] = {
-	0xdeadbeef, 0xbeefdead
+	long long expected_result[] = {
+	0xdeadbeefll, 0xbeefdeadll
 	};
 	void *handle;
-	int (*sym)(void);
-	int result;
+	long long (*sym)(void);
+	long long result;
 	const char *error;
 	size_t i;
 
@@ -86,7 +86,7 @@ ATF_TC_BODY(rtld_ifunc, tc)
 		ATF_CHECK(error == NULL);
 
 		char *command;
-		easprintf(, "%s/h_ifunc %d",
+		easprintf(, "%s/h_ifunc %lld",
 		atf_tc_get_config_var(tc, "srcdir"), expected_result[i]);
 		if (system(command) != EXIT_SUCCESS)
 			atf_tc_fail("Test failed; see output for details");
@@ -106,13 +106,13 @@ ATF_TC_BODY(rtld_hidden_ifunc, tc)
 	const char *envstr[] = {
 	"0", "1"
 	};
-	int expected_result[] = {
-	0xdeadbeef, 0xbeefdead
+	long long expected_result[] = {
+	0xdeadbeefll, 0xbeefdeadll
 	};
 	void *handle;
-	int (*sym)(void);
-	int (*(*sym2)(void))(void);
-	int result;
+	long long (*sym)(void);
+	long long (*(*sym2)(void))(void);
+	long long result;
 	const char *error;
 	size_t i;
 
@@ -149,7 +149,7 @@ ATF_TC_BODY(rtld_hidden_ifunc, tc)
 		ATF_CHECK(error == NULL);
 
 		char *command;
-		easprintf(, "%s/h_ifunc %d",
+		easprintf(, "%s/h_ifunc %lld",
 		atf_tc_get_config_var(tc, "srcdir"), expected_result[i]);
 		if (system(command) != EXIT_SUCCESS)
 			atf_tc_fail("Test failed; see output for details");
@@ -165,26 +165,26 @@ ATF_TC_HEAD(rtld_main_ifunc, tc)
 }
 
 #if LINKER_SUPPORT
-static unsigned int
+static long long
 ifunc_helper(void)
 {
-	return 0xdeadbeef;
+	return 0xdeadbeefll;
 }
 
 static __attribute__((used))
-unsigned int (*resolve_ifunc(void))(void)
+long long (*resolve_ifunc(void))(void)
 {
 	return ifunc_helper;
 }
 __hidden_ifunc(ifunc, resolve_ifunc);
 #endif
-unsigned int ifunc(void);
+long long ifunc(void);
 
 ATF_TC_BODY(rtld_main_ifunc, tc)
 {
 	if (!LINKER_SUPPORT)
 		atf_tc_skip("Missing linker support for ifunc relocations");
-	ATF_CHECK(ifunc() == 0xdeadbeef);
+	ATF_CHECK(ifunc() == 0xdeadbeefll);
 }
 
 ATF_TP_ADD_TCS(tp)

Index: src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c
diff -u src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.6 src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.7
--- src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.6	Sat Aug 12 09:03:28 2017
+++ src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c	Fri Mar  9 20:15:03 2018
@@ -30,27 +30,27 @@
 #include 
 #include 
 
-static int
+static long long
 ifunc1(void)
 {
-	return 0xdeadbeef;
+	return 0xdeadbeefll;
 }
 
-static int
+static long long
 ifunc2(void)
 {
-	return 0xbeefdead;
+	return 0xbeefdeadll;
 }
 
 static __attribute__((used))
-int (*resolve_ifunc(void))(void)
+long long (*resolve_ifunc(void))(void)
 {
 	const char *e = getenv("USE_IFUNC2");
 	return e && strcmp(e, "1") == 0 ? ifunc2 : ifunc1;
 }
 
 static __attribute__((used))
-int (*resolve_ifunc2(void))(void)
+long 

CVS commit: src/tests/libexec/ld.elf_so

2017-12-31 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Mon Jan  1 06:34:13 UTC 2018

Modified Files:
src/tests/libexec/ld.elf_so: t_ifunc.c

Log Message:
Build less of the test code if there's no linker ifunc support.

r1.6 changed the code in such a way that it was hitting a BFD assert on
MIPS, causing the builds to fail.

we were hitting the assert at binutils/dist/bfd/elfxx-mips.c:10879


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/tests/libexec/ld.elf_so/t_ifunc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/t_ifunc.c
diff -u src/tests/libexec/ld.elf_so/t_ifunc.c:1.6 src/tests/libexec/ld.elf_so/t_ifunc.c:1.7
--- src/tests/libexec/ld.elf_so/t_ifunc.c:1.6	Sat Dec 30 16:53:34 2017
+++ src/tests/libexec/ld.elf_so/t_ifunc.c	Mon Jan  1 06:34:13 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ifunc.c,v 1.6 2017/12/30 16:53:34 martin Exp $	*/
+/*	$NetBSD: t_ifunc.c,v 1.7 2018/01/01 06:34:13 maya Exp $	*/
 
 /*
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -35,11 +35,10 @@
 
 #include "h_macros.h"
 
-#if !defined( __arm__) && !defined(__i386__) && !defined(__x86_64__) && !defined(__powerpc__) && !defined(__sparc__)
-#define	LINKER_SUPPORT()	\
-	atf_tc_skip("Missing linker support for ifunc relocations")
+#if defined( __arm__) || defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || defined(__sparc__)
+#define	LINKER_SUPPORT 1
 #else
-#define	LINKER_SUPPORT()	/* yes */
+#define	LINKER_SUPPORT 0
 #endif
 
 ATF_TC(rtld_ifunc);
@@ -63,7 +62,8 @@ ATF_TC_BODY(rtld_ifunc, tc)
 	const char *error;
 	size_t i;
 
-	LINKER_SUPPORT();
+	if (!LINKER_SUPPORT)
+		atf_tc_skip("Missing linker support for ifunc relocations");
 
 	for (i = 0; i < __arraycount(envstr); ++i) {
 		setenv("USE_IFUNC2", envstr[i], 1);
@@ -116,7 +116,8 @@ ATF_TC_BODY(rtld_hidden_ifunc, tc)
 	const char *error;
 	size_t i;
 
-	LINKER_SUPPORT();
+	if (!LINKER_SUPPORT)
+		atf_tc_skip("Missing linker support for ifunc relocations");
 
 	for (i = 0; i < __arraycount(envstr); ++i) {
 		setenv("USE_IFUNC2", envstr[i], 1);
@@ -163,6 +164,7 @@ ATF_TC_HEAD(rtld_main_ifunc, tc)
 	"ifunc functions are resolved in the executable");
 }
 
+#if LINKER_SUPPORT
 static unsigned int
 ifunc_helper(void)
 {
@@ -175,11 +177,13 @@ unsigned int (*resolve_ifunc(void))(void
 	return ifunc_helper;
 }
 __hidden_ifunc(ifunc, resolve_ifunc);
+#endif
 unsigned int ifunc(void);
 
 ATF_TC_BODY(rtld_main_ifunc, tc)
 {
-	LINKER_SUPPORT();
+	if (!LINKER_SUPPORT)
+		atf_tc_skip("Missing linker support for ifunc relocations");
 	ATF_CHECK(ifunc() == 0xdeadbeef);
 }
 



CVS commit: src/tests/libexec/ld.elf_so

2017-12-30 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Dec 30 16:53:34 UTC 2017

Modified Files:
src/tests/libexec/ld.elf_so: t_ifunc.c

Log Message:
Skip all tests on architectures w/o ifunc linker/ld.elf_so support.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/libexec/ld.elf_so/t_ifunc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/t_ifunc.c
diff -u src/tests/libexec/ld.elf_so/t_ifunc.c:1.5 src/tests/libexec/ld.elf_so/t_ifunc.c:1.6
--- src/tests/libexec/ld.elf_so/t_ifunc.c:1.5	Mon Nov  6 21:16:03 2017
+++ src/tests/libexec/ld.elf_so/t_ifunc.c	Sat Dec 30 16:53:34 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ifunc.c,v 1.5 2017/11/06 21:16:03 joerg Exp $	*/
+/*	$NetBSD: t_ifunc.c,v 1.6 2017/12/30 16:53:34 martin Exp $	*/
 
 /*
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -35,6 +35,13 @@
 
 #include "h_macros.h"
 
+#if !defined( __arm__) && !defined(__i386__) && !defined(__x86_64__) && !defined(__powerpc__) && !defined(__sparc__)
+#define	LINKER_SUPPORT()	\
+	atf_tc_skip("Missing linker support for ifunc relocations")
+#else
+#define	LINKER_SUPPORT()	/* yes */
+#endif
+
 ATF_TC(rtld_ifunc);
 
 ATF_TC_HEAD(rtld_ifunc, tc)
@@ -56,9 +63,7 @@ ATF_TC_BODY(rtld_ifunc, tc)
 	const char *error;
 	size_t i;
 
-#if !defined( __arm__) && !defined(__i386__) && !defined(__x86_64__) && !defined(__powerpc__) && !defined(__sparc__)
-	atf_tc_expect_fail("Missing linker support for hidden ifunc relocations");
-#endif
+	LINKER_SUPPORT();
 
 	for (i = 0; i < __arraycount(envstr); ++i) {
 		setenv("USE_IFUNC2", envstr[i], 1);
@@ -111,6 +116,8 @@ ATF_TC_BODY(rtld_hidden_ifunc, tc)
 	const char *error;
 	size_t i;
 
+	LINKER_SUPPORT();
+
 	for (i = 0; i < __arraycount(envstr); ++i) {
 		setenv("USE_IFUNC2", envstr[i], 1);
 
@@ -172,6 +179,7 @@ unsigned int ifunc(void);
 
 ATF_TC_BODY(rtld_main_ifunc, tc)
 {
+	LINKER_SUPPORT();
 	ATF_CHECK(ifunc() == 0xdeadbeef);
 }
 



CVS commit: src/tests/libexec/ld.elf_so

2017-07-21 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Jul 21 16:39:20 UTC 2017

Modified Files:
src/tests/libexec/ld.elf_so: h_thread_local_dtor.c

Log Message:
Avoid a race condition between dlclose and thread termination.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/libexec/ld.elf_so/h_thread_local_dtor.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/h_thread_local_dtor.c
diff -u src/tests/libexec/ld.elf_so/h_thread_local_dtor.c:1.1 src/tests/libexec/ld.elf_so/h_thread_local_dtor.c:1.2
--- src/tests/libexec/ld.elf_so/h_thread_local_dtor.c:1.1	Tue Jul 11 15:21:36 2017
+++ src/tests/libexec/ld.elf_so/h_thread_local_dtor.c	Fri Jul 21 16:39:20 2017
@@ -75,10 +75,6 @@ main(void)
 	pthread_cond_wait(, );
 	pthread_mutex_unlock();
 
-	pthread_mutex_lock();
-	pthread_cond_signal();
-	pthread_mutex_unlock();
-
 	printf("before dlclose\n");
 	dlclose(dso);
 	printf("after dlclose\n");
@@ -86,6 +82,11 @@ main(void)
 	if (dso == NULL)
 		errx(1, "%s", dlerror());
 	dlclose(dso);
+
+	pthread_mutex_lock();
+	pthread_cond_signal();
+	pthread_mutex_unlock();
+
 	if (pthread_join(thread, NULL))
 		err(1, "pthread_join");
 	return 0;



CVS commit: src/tests/libexec/ld.elf_so/helper_ifunc_dso

2014-08-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Aug 26 11:10:03 UTC 2014

Modified Files:
src/tests/libexec/ld.elf_so/helper_ifunc_dso: h_helper_ifunc.c

Log Message:
effectively disable the test to fix the build and explain why.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c
diff -u src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.1 src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.2
--- src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.1	Mon Aug 25 16:40:53 2014
+++ src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c	Tue Aug 26 07:10:02 2014
@@ -49,4 +49,15 @@ int (*resolve_ifunc(void))(void)
 	return e  strcmp(e, 1) == 0 ? ifunc2 : ifunc1;
 }
 
+#ifdef __HAVE_IFUNC
+// XXX: m68k, vax, mips, sh3 (and others) binutils don't support this.
+// Needs to be staged in for archs that support it.
 __ifunc(ifunc, resolve_ifunc);
+#else
+int ifunc(void);
+int
+ifunc(void) {
+	const char *e = getenv(USE_IFUNC2);
+	return e  strcmp(e, 1) == 0 ? ifunc2() : ifunc1();
+}
+#endif



CVS commit: src/tests/libexec/ld.elf_so/helper_ifunc_dso

2014-08-26 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Aug 26 16:25:35 UTC 2014

Modified Files:
src/tests/libexec/ld.elf_so/helper_ifunc_dso: h_helper_ifunc.c

Log Message:
Revert. There is no such thing as __HAVE_IFUNC and there should not be
one in first place.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c
diff -u src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.2 src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.3
--- src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.2	Tue Aug 26 11:10:02 2014
+++ src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c	Tue Aug 26 16:25:35 2014
@@ -49,15 +49,9 @@ int (*resolve_ifunc(void))(void)
 	return e  strcmp(e, 1) == 0 ? ifunc2 : ifunc1;
 }
 
-#ifdef __HAVE_IFUNC
-// XXX: m68k, vax, mips, sh3 (and others) binutils don't support this.
-// Needs to be staged in for archs that support it.
-__ifunc(ifunc, resolve_ifunc);
-#else
 int ifunc(void);
 int
 ifunc(void) {
 	const char *e = getenv(USE_IFUNC2);
 	return e  strcmp(e, 1) == 0 ? ifunc2() : ifunc1();
 }
-#endif



CVS commit: src/tests/libexec/ld.elf_so/helper_ifunc_dso

2014-08-26 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue Aug 26 17:13:42 UTC 2014

Modified Files:
src/tests/libexec/ld.elf_so/helper_ifunc_dso: h_helper_ifunc.c

Log Message:
Really revert to the original version.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c
diff -u src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.3 src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.4
--- src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c:1.3	Tue Aug 26 16:25:35 2014
+++ src/tests/libexec/ld.elf_so/helper_ifunc_dso/h_helper_ifunc.c	Tue Aug 26 17:13:42 2014
@@ -49,9 +49,4 @@ int (*resolve_ifunc(void))(void)
 	return e  strcmp(e, 1) == 0 ? ifunc2 : ifunc1;
 }
 
-int ifunc(void);
-int
-ifunc(void) {
-	const char *e = getenv(USE_IFUNC2);
-	return e  strcmp(e, 1) == 0 ? ifunc2() : ifunc1();
-}
+__ifunc(ifunc, resolve_ifunc);



CVS commit: src/tests/libexec/ld.elf_so

2014-02-14 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Fri Feb 14 20:33:32 UTC 2014

Modified Files:
src/tests/libexec/ld.elf_so/helper_symver_dso1: Makefile
src/tests/libexec/ld.elf_so/helper_symver_dso2: Makefile

Log Message:
ARM now works with integrated-as.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 \
src/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile
cvs rdiff -u -r1.2 -r1.3 \
src/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile
diff -u src/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile:1.2 src/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile:1.3
--- src/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile:1.2	Wed Dec 25 22:26:35 2013
+++ src/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile	Fri Feb 14 20:33:32 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2013/12/25 22:26:35 joerg Exp $
+# $NetBSD: Makefile,v 1.3 2014/02/14 20:33:32 joerg Exp $
 
 .include bsd.own.mk
 
@@ -20,10 +20,5 @@ FILESDIR=	${TESTSBASE}/libexec/ld.elf_so
 
 LDFLAGS.lib${LIB} += -Wl,--version-script=${.CURDIR}/h_helper_symver_dso1.map
 
-.if !empty(MACHINE_ARCH:M*arm*)
-# LLVM PR 18273
-COPTS.h_helper_symver_dso1.c=	${${ACTIVE_CC} == clang:?-no-integrated-as :}
-.endif
-
 .include bsd.lib.mk
 

Index: src/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile
diff -u src/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile:1.2 src/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile:1.3
--- src/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile:1.2	Wed Dec 25 22:26:35 2013
+++ src/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile	Fri Feb 14 20:33:32 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2013/12/25 22:26:35 joerg Exp $
+# $NetBSD: Makefile,v 1.3 2014/02/14 20:33:32 joerg Exp $
 
 .include bsd.own.mk
 
@@ -20,9 +20,4 @@ FILESDIR=	${TESTSBASE}/libexec/ld.elf_so
 
 LDFLAGS.lib${LIB} += -Wl,--version-script=${.CURDIR}/h_helper_symver_dso2.map
 
-.if !empty(MACHINE_ARCH:M*arm*)
-# LLVM PR 18273
-COPTS.h_helper_symver_dso2.c=	${${ACTIVE_CC} == clang:?-no-integrated-as :}
-.endif
-
 .include bsd.lib.mk



CVS commit: src/tests/libexec/ld.elf_so

2013-12-25 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Wed Dec 25 22:26:35 UTC 2013

Modified Files:
src/tests/libexec/ld.elf_so/helper_symver_dso1: Makefile
src/tests/libexec/ld.elf_so/helper_symver_dso2: Makefile

Log Message:
Disable integrated-assembler for clang on ARM for two files that are
victims of the @ comment mess on that platform. Add a reference to the
upstream PR.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile
diff -u src/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile:1.1 src/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile:1.2
--- src/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile:1.1	Sat Jun 25 05:45:13 2011
+++ src/tests/libexec/ld.elf_so/helper_symver_dso1/Makefile	Wed Dec 25 22:26:35 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2011/06/25 05:45:13 nonaka Exp $
+# $NetBSD: Makefile,v 1.2 2013/12/25 22:26:35 joerg Exp $
 
 .include bsd.own.mk
 
@@ -20,4 +20,10 @@ FILESDIR=	${TESTSBASE}/libexec/ld.elf_so
 
 LDFLAGS.lib${LIB} += -Wl,--version-script=${.CURDIR}/h_helper_symver_dso1.map
 
+.if !empty(MACHINE_ARCH:M*arm*)
+# LLVM PR 18273
+COPTS.h_helper_symver_dso1.c=	${${ACTIVE_CC} == clang:?-no-integrated-as :}
+.endif
+
 .include bsd.lib.mk
+

Index: src/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile
diff -u src/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile:1.1 src/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile:1.2
--- src/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile:1.1	Sat Jun 25 05:45:13 2011
+++ src/tests/libexec/ld.elf_so/helper_symver_dso2/Makefile	Wed Dec 25 22:26:35 2013
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2011/06/25 05:45:13 nonaka Exp $
+# $NetBSD: Makefile,v 1.2 2013/12/25 22:26:35 joerg Exp $
 
 .include bsd.own.mk
 
@@ -20,4 +20,9 @@ FILESDIR=	${TESTSBASE}/libexec/ld.elf_so
 
 LDFLAGS.lib${LIB} += -Wl,--version-script=${.CURDIR}/h_helper_symver_dso2.map
 
+.if !empty(MACHINE_ARCH:M*arm*)
+# LLVM PR 18273
+COPTS.h_helper_symver_dso2.c=	${${ACTIVE_CC} == clang:?-no-integrated-as :}
+.endif
+
 .include bsd.lib.mk



CVS commit: src/tests/libexec/ld.elf_so

2011-05-24 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Tue May 24 15:24:28 UTC 2011

Modified Files:
src/tests/libexec/ld.elf_so: h_df_1_noopen.c

Log Message:
Use proper format string


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/libexec/ld.elf_so/h_df_1_noopen.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/h_df_1_noopen.c
diff -u src/tests/libexec/ld.elf_so/h_df_1_noopen.c:1.2 src/tests/libexec/ld.elf_so/h_df_1_noopen.c:1.3
--- src/tests/libexec/ld.elf_so/h_df_1_noopen.c:1.2	Thu Mar 17 15:59:32 2011
+++ src/tests/libexec/ld.elf_so/h_df_1_noopen.c	Tue May 24 15:24:28 2011
@@ -39,7 +39,7 @@
 
 	handle = dlopen(libpthread.so, RTLD_NOLOAD);
 	if (handle == NULL)
-		errx(1, dlerror());
+		errx(1, %s, dlerror());
 
 	printf(libpthread loaded successfully\n);
 	return 0;



CVS commit: src/tests/libexec/ld.elf_so/helper_dso1

2011-04-02 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Sat Apr  2 12:53:33 UTC 2011

Modified Files:
src/tests/libexec/ld.elf_so/helper_dso1: h_helper_dso1.c

Log Message:
Don't fail on platforms without TLS


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/tests/libexec/ld.elf_so/helper_dso1/h_helper_dso1.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/helper_dso1/h_helper_dso1.c
diff -u src/tests/libexec/ld.elf_so/helper_dso1/h_helper_dso1.c:1.1 src/tests/libexec/ld.elf_so/helper_dso1/h_helper_dso1.c:1.2
--- src/tests/libexec/ld.elf_so/helper_dso1/h_helper_dso1.c:1.1	Thu Mar 31 23:34:48 2011
+++ src/tests/libexec/ld.elf_so/helper_dso1/h_helper_dso1.c	Sat Apr  2 12:53:32 2011
@@ -29,6 +29,11 @@
 
 #include poll.h
 #include stddef.h
+#include sys/tls.h
+
+#if !defined(__HAVE_TLS_VARIANT_I)  !defined(__HAVE_TLS_VARIANT_II)
+#define	__thread
+#endif
 
 extern int sleep_init;
 extern int sleep_fini;



CVS commit: src/tests/libexec/ld.elf_so

2011-03-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Mar 25 14:45:21 UTC 2011

Modified Files:
src/tests/libexec/ld.elf_so: t_dlinfo.c

Log Message:
check that dlopen()d dso shows up in the linkmap


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/libexec/ld.elf_so/t_dlinfo.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/t_dlinfo.c
diff -u src/tests/libexec/ld.elf_so/t_dlinfo.c:1.2 src/tests/libexec/ld.elf_so/t_dlinfo.c:1.3
--- src/tests/libexec/ld.elf_so/t_dlinfo.c:1.2	Wed Nov  3 16:10:23 2010
+++ src/tests/libexec/ld.elf_so/t_dlinfo.c	Fri Mar 25 14:45:21 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_dlinfo.c,v 1.2 2010/11/03 16:10:23 christos Exp $	*/
+/*	$NetBSD: t_dlinfo.c,v 1.3 2011/03/25 14:45:21 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -84,10 +84,35 @@
 	dlclose(handle);
 }
 
+ATF_TC(rtld_dlinfo_linkmap_dlopen_iter);
+ATF_TC_HEAD(rtld_dlinfo_linkmap_dlopen_iter, tc)
+{
+	atf_tc_set_md_var(tc, descr, dlopen'd dso's show up in the list);
+}
+ATF_TC_BODY(rtld_dlinfo_linkmap_dlopen_iter, tc)
+{
+	struct link_map *map;
+	void *handle;
+
+	handle = dlopen(libutil.so, RTLD_LAZY);
+	ATF_CHECK(handle);
+
+	RZ(dlinfo(RTLD_SELF, RTLD_DI_LINKMAP, map));
+
+	for (; map-l_next; map = map-l_next)
+		continue;
+	for (; map; map = map-l_prev)
+		if (strstr(map-l_name, libutil.so) != NULL)
+			break;
+	
+	ATF_REQUIRE_MSG(map, dlopen()d object not found from linkmap);
+}
+
 ATF_TP_ADD_TCS(tp)
 {
 	ATF_TP_ADD_TC(tp, rtld_dlinfo_linkmap_self);
 	ATF_TP_ADD_TC(tp, rtld_dlinfo_linkmap_inval);
 	ATF_TP_ADD_TC(tp, rtld_dlinfo_linkmap_dlopen);
+	ATF_TP_ADD_TC(tp, rtld_dlinfo_linkmap_dlopen_iter);
 	return 0;
 }



CVS commit: src/tests/libexec/ld.elf_so

2011-03-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Mar 25 14:47:31 UTC 2011

Modified Files:
src/tests/libexec/ld.elf_so: t_dlinfo.c

Log Message:
check that we can dlopen() the linkmap name, too


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/libexec/ld.elf_so/t_dlinfo.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/t_dlinfo.c
diff -u src/tests/libexec/ld.elf_so/t_dlinfo.c:1.3 src/tests/libexec/ld.elf_so/t_dlinfo.c:1.4
--- src/tests/libexec/ld.elf_so/t_dlinfo.c:1.3	Fri Mar 25 14:45:21 2011
+++ src/tests/libexec/ld.elf_so/t_dlinfo.c	Fri Mar 25 14:47:31 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_dlinfo.c,v 1.3 2011/03/25 14:45:21 pooka Exp $	*/
+/*	$NetBSD: t_dlinfo.c,v 1.4 2011/03/25 14:47:31 pooka Exp $	*/
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -106,6 +106,8 @@
 			break;
 	
 	ATF_REQUIRE_MSG(map, dlopen()d object not found from linkmap);
+	ATF_REQUIRE_MSG(dlopen(map-l_name, RTLD_LAZY) != NULL,
+	could not dlopen() name in linkmap);
 }
 
 ATF_TP_ADD_TCS(tp)



CVS commit: src/tests/libexec/ld.elf_so

2011-03-17 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Mar 17 15:59:32 UTC 2011

Modified Files:
src/tests/libexec/ld.elf_so: h_df_1_noopen.c t_df_1_noopen.sh

Log Message:
Blame where blame is due.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/libexec/ld.elf_so/h_df_1_noopen.c
cvs rdiff -u -r1.2 -r1.3 src/tests/libexec/ld.elf_so/t_df_1_noopen.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/libexec/ld.elf_so/h_df_1_noopen.c
diff -u src/tests/libexec/ld.elf_so/h_df_1_noopen.c:1.1 src/tests/libexec/ld.elf_so/h_df_1_noopen.c:1.2
--- src/tests/libexec/ld.elf_so/h_df_1_noopen.c:1.1	Fri Dec 24 12:41:43 2010
+++ src/tests/libexec/ld.elf_so/h_df_1_noopen.c	Thu Mar 17 15:59:32 2011
@@ -3,7 +3,7 @@
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
- * by
+ * by Nick Hudson.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions

Index: src/tests/libexec/ld.elf_so/t_df_1_noopen.sh
diff -u src/tests/libexec/ld.elf_so/t_df_1_noopen.sh:1.2 src/tests/libexec/ld.elf_so/t_df_1_noopen.sh:1.3
--- src/tests/libexec/ld.elf_so/t_df_1_noopen.sh:1.2	Fri Dec 31 08:52:32 2010
+++ src/tests/libexec/ld.elf_so/t_df_1_noopen.sh	Thu Mar 17 15:59:32 2011
@@ -1,10 +1,10 @@
-# $NetBSD: t_df_1_noopen.sh,v 1.2 2010/12/31 08:52:32 pooka Exp $
+# $NetBSD: t_df_1_noopen.sh,v 1.3 2011/03/17 15:59:32 skrll Exp $
 #
 # Copyright (c) 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # This code is derived from software contributed to The NetBSD Foundation
-# by
+# by Nick Hudson.
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions