From 188f3a89e6aca649ce3c2a76baf0b3e406758904 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Sun, 5 Jul 2015 20:35:32 +0100 Subject: [PATCH] Finish FreeBSD/arch64. All tests pass on FreeBSD HEAD. --- include/private/gc_priv.h | 3 ++- include/private/gcconfig.h | 10 +++++++--- os_dep.c | 3 ++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index c1872a3..76a7757 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -2485,7 +2485,8 @@ GC_INNER ptr_t GC_store_debug_info(ptr_t p, word sz, const char *str, #endif #if defined(FREEBSD) && (defined(I386) || defined(X86_64) \ - || defined(powerpc) || defined(__powerpc__)) + || defined(powerpc) || defined(__powerpc__) \ + || defined(__aarch64__)) # include # if !defined(PCR) # define NEED_FIND_LIMIT diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index c359d0a..40d97f8 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -2069,14 +2069,18 @@ # endif # endif # ifdef FREEBSD -# define ALIGNMENT 8 # define OS_TYPE "FREEBSD" +# ifndef GC_FREEBSD_THREADS +# define MPROTECT_VDB +# endif +# define FREEBSD_STACKBOTTOM # ifdef __ELF__ # define DYNAMIC_LOADING # endif -# define HEURISTIC2 extern char etext[]; -# define SEARCH_FOR_DATA_START + ptr_t GC_FreeBSDGetDataStart(size_t, ptr_t); +# define DATASTART GC_FreeBSDGetDataStart(0x1000, (ptr_t)etext) +# define DATASTART_IS_FUNC # endif # ifdef NOSYS /* __data_start is usually defined in the target linker script. */ diff --git a/os_dep.c b/os_dep.c index db3572a..6781781 100644 --- a/os_dep.c +++ b/os_dep.c @@ -1839,7 +1839,8 @@ void GC_register_data_segments(void) # endif # if defined(FREEBSD) && !defined(PCR) && (defined(I386) || defined(X86_64) \ - || defined(powerpc) || defined(__powerpc__)) + || defined(powerpc) || defined(__powerpc__) \ + || defined(__aarch64__)) /* Its unclear whether this should be identical to the above, or */ /* whether it should apply to non-X86 architectures. */ -- 2.4.5