From: Kurt Miller Date: Sun, 2 Jun 2013 14:24:36 +0000 (+0400) Subject: Register dynamic libraries via dl_iterate_phdr on OpenBSD X-Git-Tag: gc7_4_0~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a233df5a38a8b1180b31285f005153f5c337e145;p=gc Register dynamic libraries via dl_iterate_phdr on OpenBSD * dyn_load.c (HAVE_DL_ITERATE_PHDR): Define for OpenBSD (with release date 2005.19 or later). --- diff --git a/dyn_load.c b/dyn_load.c index 246195d9..5e077b5b 100644 --- a/dyn_load.c +++ b/dyn_load.c @@ -80,12 +80,19 @@ STATIC GC_has_static_roots_func GC_has_static_roots = 0; # define ELFSIZE ARCH_ELFSIZE #endif +#if defined(OPENBSD) +# include +# if OpenBSD >= 200519 +# define HAVE_DL_ITERATE_PHDR +# endif +#endif /* OPENBSD */ + #if defined(SCO_ELF) || defined(DGUX) || defined(HURD) \ || (defined(__ELF__) && (defined(LINUX) || defined(FREEBSD) \ || defined(NETBSD) || defined(OPENBSD))) # include # if !defined(OPENBSD) && !defined(PLATFORM_ANDROID) - /* FIXME: Why we exclude it for OpenBSD? */ + /* OpenBSD does not have elf.h file; link.h below is sufficient. */ /* Exclude Android because linker.h below includes its own version. */ # include # endif