Module Name:    src
Committed By:   matt
Date:           Sat Sep 12 17:45:08 UTC 2009

Modified Files:
        src/sys/compat/netbsd32 [matt-nb5-mips64]: netbsd32_exec_elf32.c

Log Message:
Add support/hooks for ELF_MD_PROBE_FUNC and ELF_INTERP_NON_RELOCATABLE.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.29.14.1 src/sys/compat/netbsd32/netbsd32_exec_elf32.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/compat/netbsd32/netbsd32_exec_elf32.c
diff -u src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.29 src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.29.14.1
--- src/sys/compat/netbsd32/netbsd32_exec_elf32.c:1.29	Sun Oct 26 07:07:35 2008
+++ src/sys/compat/netbsd32/netbsd32_exec_elf32.c	Sat Sep 12 17:45:08 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_exec_elf32.c,v 1.29 2008/10/26 07:07:35 mrg Exp $	*/
+/*	$NetBSD: netbsd32_exec_elf32.c,v 1.29.14.1 2009/09/12 17:45:08 matt Exp $	*/
 /*	from: NetBSD: exec_aout.c,v 1.15 1996/09/26 23:34:46 cgd Exp */
 
 /*
@@ -57,7 +57,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.29 2008/10/26 07:07:35 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_exec_elf32.c,v 1.29.14.1 2009/09/12 17:45:08 matt Exp $");
 
 #define	ELFSIZE		32
 
@@ -77,7 +77,6 @@
 #include <compat/netbsd32/netbsd32.h>
 #include <compat/netbsd32/netbsd32_exec.h>
 
-#include <machine/frame.h>
 #include <machine/netbsd32_machdep.h>
 
 int netbsd32_copyinargs(struct exec_package *, struct ps_strings *,
@@ -96,6 +95,13 @@
 	if ((error = ELFNAME2(netbsd,signature)(l, epp, eh)) != 0)
 		return error;
 
+#ifdef ELF_MD_PROBE_FUNC
+	if ((error = ELF_MD_PROBE_FUNC(l, epp, eh, itp, pos)) != 0)
+		return error;
+#elif defined(ELF_INTERP_NON_RELOCATABLE)
+	*pos = ELF_LINK_ADDR;
+#endif
+
 	return ELFNAME2(netbsd32,probe_noteless)(l, epp, eh, itp, pos);
 }
 

Reply via email to