patch-boehm-gc_dyn_load_c 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. $OpenBSD: patch-boehm-gc_dyn_load_c,v 1.1.1.1 2014/06/26 16:30:15 pascal Exp $
  2. --- boehm-gc/dyn_load.c.orig Sun Nov 4 23:56:02 2012
  3. +++ boehm-gc/dyn_load.c Fri Feb 8 13:18:49 2013
  4. @@ -61,6 +61,7 @@
  5. !defined(HPUX) && !(defined(LINUX) && defined(__ELF__)) && \
  6. !defined(RS6000) && !defined(SCO_ELF) && !defined(DGUX) && \
  7. !(defined(FREEBSD) && defined(__ELF__)) && \
  8. + !(defined(OPENBSD) && defined(__ELF__)) && \
  9. !(defined(NETBSD) && defined(__ELF__)) && !defined(HURD) && \
  10. !defined(DARWIN)
  11. --> We only know how to find data segments of dynamic libraries for the
  12. @@ -100,9 +101,9 @@
  13. #if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
  14. (defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
  15. + (defined(OPENBSD) && defined(__ELF__)) || \
  16. (defined(NETBSD) && defined(__ELF__)) || defined(HURD)
  17. # include <stddef.h>
  18. -# include <elf.h>
  19. # include <link.h>
  20. #endif
  21. @@ -116,7 +117,7 @@
  22. # define ElfW(type) Elf64_##type
  23. # endif
  24. # else
  25. -# ifdef NETBSD
  26. +# if defined(NETBSD) || defined(OPENBSD)
  27. # if ELFSIZE == 32
  28. # define ElfW(type) Elf32_##type
  29. # else
  30. @@ -365,6 +366,7 @@ void GC_register_dynamic_libraries()
  31. #if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
  32. (defined(FREEBSD) && defined(__ELF__)) || defined(DGUX) || \
  33. + (defined(OPENBSD) && defined(__ELF__)) || \
  34. (defined(NETBSD) && defined(__ELF__)) || defined(HURD)
  35. @@ -473,6 +475,10 @@ GC_bool GC_register_main_static_data()
  36. # if (defined(FREEBSD) && __FreeBSD__ >= 7)
  37. /* On the FreeBSD system, any target system at major version 7 shall */
  38. /* have dl_iterate_phdr; therefore, we need not make it weak as above. */
  39. +#define HAVE_DL_ITERATE_PHDR
  40. +#endif
  41. +
  42. +#if defined(OPENBSD)
  43. #define HAVE_DL_ITERATE_PHDR
  44. #endif