# undef GC_must_restore_redefined_dlopen
# endif
+/* PLTSCHEME: added OPENBSD: */
#if (defined(DYNAMIC_LOADING) || defined(MSWIN32) || defined(MSWINCE)) \
&& !defined(PCR)
#if !defined(SUNOS4) && !defined(SUNOS5DL) && !defined(IRIX5) && \
!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
# endif /* !USE_PROC ... */
# endif /* SUNOS */
+/* PLTSCHEME: added OPENBSD: */
#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
(defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
+ (defined(OPENBSD) && defined(__ELF__)) || \
(defined(NETBSD) && defined(__ELF__)) || defined(HURD)
# ifndef PF_W
# define PF_W 2
# endif
+/* PLTSCHEME: OPENBSD */
+#elif defined(OPENBSD)
+# include <link_elf.h>
#else
# include <elf.h>
#endif
#ifdef __GNUC__
# pragma weak _DYNAMIC
#endif
+
+/* PLTSCHEME: ifndef OPENBSD */
+#ifndef OPENBSD
extern ElfW(Dyn) _DYNAMIC[];
+#endif
static struct link_map *
GC_FirstDLOpenedLinkMap()
# define I386
# define mach_type_known
# endif
-# if defined(__NetBSD__) && defined(__x86_64__)
+/* PLTSCHEME: added OpenBSD: */
+# if (defined(__NetBSD__) || defined(__OpenBSD__)) && defined(__x86_64__)
# define X86_64
# define mach_type_known
# endif
extern char etext[];
# define SEARCH_FOR_DATA_START
# endif
-# ifdef NETBSD
-# define OS_TYPE "NETBSD"
+/* PLTSCHEME: added OPENBSD: */
+# if defined(NETBSD) || defined(OPENBSD)
+# ifdef NETBSD
+# define OS_TYPE "NETBSD"
+# endif
+# ifdef OPENBSD
+# define OS_TYPE "OPENBSD"
+# endif
# ifdef __ELF__
# define DYNAMIC_LOADING
# endif