From: Matthew Flatt Date: Sat, 14 Oct 2006 00:58:14 +0000 (+0000) Subject: openbsd x86_64 patches X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14ccaf312c7b1a08e2cb1cb2d261a479d7260aef;p=gc openbsd x86_64 patches svn: r4597 --- diff --git a/dyn_load.c b/dyn_load.c index 2e4ebed7..3882526c 100644 --- a/dyn_load.c +++ b/dyn_load.c @@ -49,6 +49,7 @@ # 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) && \ @@ -57,6 +58,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 @@ -285,8 +287,10 @@ void GC_register_dynamic_libraries() # 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) @@ -477,6 +481,9 @@ GC_bool GC_register_main_static_data() # ifndef PF_W # define PF_W 2 # endif +/* PLTSCHEME: OPENBSD */ +#elif defined(OPENBSD) +# include #else # include #endif @@ -487,7 +494,11 @@ GC_bool GC_register_main_static_data() #ifdef __GNUC__ # pragma weak _DYNAMIC #endif + +/* PLTSCHEME: ifndef OPENBSD */ +#ifndef OPENBSD extern ElfW(Dyn) _DYNAMIC[]; +#endif static struct link_map * GC_FirstDLOpenedLinkMap() diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 74cf149d..7395faf5 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -331,7 +331,8 @@ # 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 @@ -2010,8 +2011,14 @@ 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