summaryrefslogtreecommitdiff
path: root/devel/boehm-gc/patches/patch-ad
diff options
context:
space:
mode:
Diffstat (limited to 'devel/boehm-gc/patches/patch-ad')
-rw-r--r--devel/boehm-gc/patches/patch-ad38
1 files changed, 38 insertions, 0 deletions
diff --git a/devel/boehm-gc/patches/patch-ad b/devel/boehm-gc/patches/patch-ad
new file mode 100644
index 00000000000..136d655e84c
--- /dev/null
+++ b/devel/boehm-gc/patches/patch-ad
@@ -0,0 +1,38 @@
+$NetBSD: patch-ad,v 1.1 1999/09/24 16:42:06 jlam Exp $
+
+--- dyn_load.c.orig 1999/06/02 19:29:13 1.1.1.2
++++ dyn_load.c 1999/06/03 12:44:49 1.2
+@@ -48,7 +48,8 @@
+ #if !defined(SUNOS4) && !defined(SUNOS5DL) && !defined(IRIX5) && \
+ !defined(MSWIN32) && !(defined(ALPHA) && defined(OSF1)) && \
+ !defined(HP_PA) && !(defined(LINUX) && defined(__ELF__)) && \
+- !defined(RS6000) && !defined(SCO_ELF)
++ !defined(RS6000) && !defined(SCO_ELF) && \
++ !(defined(NETBSD) && defined(__ELF__))
+ --> We only know how to find data segments of dynamic libraries for the
+ --> above. Additional SVR4 variants might not be too
+ --> hard to add.
+@@ -260,14 +261,22 @@
+ # endif /* !USE_PROC ... */
+ # endif /* SUNOS */
+
+-#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF)
++#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
++ (defined(NETBSD) && defined(__ELF__))
+
+ /* Dynamic loading code for Linux running ELF. Somewhat tested on
+ * Linux/x86, untested but hopefully should work on Linux/Alpha.
+ * This code was derived from the Solaris/ELF support. Thanks to
+ * whatever kind soul wrote that. - Patrick Bridges */
+
++#if defined(NETBSD)
++#include <sys/exec_elf.h>
++#define DT_DEBUG 21
++#define PT_LOAD 1
++#define PF_W 0x2
++#else
+ #include <elf.h>
++#endif
+ #include <link.h>
+
+ /* Newer versions of Linux/Alpha and Linux/x86 define this macro. We