Update the arm32 code to match arm64, powerpc and x86.
* include/private/gc_priv.h: Include machine/trap.h if
DATASTART_USES_BSDGETDATASTART (instead of checking for FREEBSD and
particular CPUs).
* include/private/gcconfig.h (ALIGNMENT, HEURISTIC2,
SEARCH_FOR_DATA_START): Remove for FreeBSD/arm.
* include/private/gcconfig.h (MPROTECT_VDB, SIG_SUSPEND,
SIG_THR_RESTART, DATASTART, DATASTART_USES_BSDGETDATASTART): Define
macro if FREEBSD and ARM32.
* os_dep.c (CODE_OK): Define for FreeBSD/arm.
# define NEED_FIND_LIMIT
#endif
-#if defined(FREEBSD) && (defined(I386) || defined(X86_64) \
- || defined(AARCH64) || defined(POWERPC))
+#if defined(DATASTART_USES_BSDGETDATASTART)
# include <machine/trap.h>
# if !defined(PCR)
# define NEED_FIND_LIMIT
# endif
-#endif /* FREEBSD */
+#endif /* DATASTART_USES_BSDGETDATASTART */
#if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__) \
&& !defined(NEED_FIND_LIMIT)
# endif
# ifdef FREEBSD
/* FreeBSD/arm */
-# define ALIGNMENT 4
# define OS_TYPE "FREEBSD"
+# ifndef GC_FREEBSD_THREADS
+# define MPROTECT_VDB
+# endif
+# define SIG_SUSPEND SIGUSR1
+# define SIG_THR_RESTART SIGUSR2
+# define FREEBSD_STACKBOTTOM
# ifdef __ELF__
# define DYNAMIC_LOADING
# endif
-# define HEURISTIC2
extern char etext[];
-# define SEARCH_FOR_DATA_START
+# define DATASTART GC_FreeBSDGetDataStart(0x1000, (ptr_t)etext)
+# define DATASTART_USES_BSDGETDATASTART
# endif
# ifdef DARWIN
/* iOS */
# ifndef SEGV_ACCERR
# define SEGV_ACCERR 2
# endif
-# if defined(AARCH64)
+# if defined(AARCH64) || defined(ARM32)
# define CODE_OK (si -> si_code == SEGV_ACCERR)
# elif defined(POWERPC)
# define AIM /* Pretend that we're AIM. */