33248e4bbc
best of all, you can drop this in on shared archs as a replacement for 6.0, I've tested opencm and w3m)
40 lines
1.5 KiB
Plaintext
40 lines
1.5 KiB
Plaintext
$OpenBSD: patch-dyn_load_c,v 1.2 2002/10/26 13:25:26 todd Exp $
|
|
--- dyn_load.c.orig Tue Aug 6 15:14:31 2002
|
|
+++ dyn_load.c Fri Oct 25 12:37:33 2002
|
|
@@ -57,6 +57,7 @@
|
|
!defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \
|
|
!defined(RS6000) && !defined(SCO_ELF) && !defined(DGUX) && \
|
|
!(defined(FREEBSD) && defined(__ELF__)) && \
|
|
+ !(defined(OPENBSD) && defined(__ELF__)) && \
|
|
!(defined(NETBSD) && defined(__ELF__)) && !defined(HURD)
|
|
--> We only know how to find data segments of dynamic libraries for the
|
|
--> above. Additional SVR4 variants might not be too
|
|
@@ -81,9 +82,9 @@
|
|
|
|
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
|
|
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
|
|
+ (defined(OPENBSD) && defined(__ELF__)) || \
|
|
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
|
|
# include <stddef.h>
|
|
-# include <elf.h>
|
|
# include <link.h>
|
|
#endif
|
|
|
|
@@ -265,6 +266,7 @@ void GC_register_dynamic_libraries()
|
|
|
|
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
|
|
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
|
|
+ (defined(OPENBSD) && defined(__ELF__)) || \
|
|
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
|
|
|
|
|
|
@@ -533,7 +535,7 @@ GC_bool GC_register_dynamic_libraries_dl
|
|
/* This doesn't necessarily work in all cases, e.g. with preloaded
|
|
* dynamic libraries. */
|
|
|
|
-#if defined(NETBSD)
|
|
+#if defined(NETBSD) || defined(OPENBSD)
|
|
# include <sys/exec_elf.h>
|
|
#else
|
|
# include <elf.h>
|