51 lines
1.8 KiB
Plaintext
51 lines
1.8 KiB
Plaintext
$OpenBSD: patch-boehm-gc_dyn_load_c,v 1.2 2012/10/17 19:58:21 kurt Exp $
|
|
--- boehm-gc/dyn_load.c.orig Mon Nov 29 09:58:16 2010
|
|
+++ boehm-gc/dyn_load.c Wed Oct 10 09:15:24 2012
|
|
@@ -60,6 +60,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) && \
|
|
!defined(DARWIN)
|
|
--> We only know how to find data segments of dynamic libraries for the
|
|
@@ -90,9 +91,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
|
|
|
|
@@ -106,7 +107,7 @@
|
|
# define ElfW(type) Elf64_##type
|
|
# endif
|
|
# else
|
|
-# ifdef NETBSD
|
|
+# if defined(NETBSD) || defined(OPENBSD)
|
|
# if ELFSIZE == 32
|
|
# define ElfW(type) Elf32_##type
|
|
# else
|
|
@@ -301,6 +302,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)
|
|
|
|
|
|
@@ -409,6 +411,10 @@ GC_bool GC_register_main_static_data()
|
|
# if (defined(FREEBSD) && __FreeBSD__ >= 7)
|
|
/* On the FreeBSD system, any target system at major version 7 shall */
|
|
/* have dl_iterate_phdr; therefore, we need not make it weak as above. */
|
|
+#define HAVE_DL_ITERATE_PHDR
|
|
+#endif
|
|
+
|
|
+#if defined(OPENBSD)
|
|
#define HAVE_DL_ITERATE_PHDR
|
|
#endif
|
|
|