Lines 29-41
Link Here
|
29 |
# if defined(FREEBSD) && (defined(__amd64__) || defined(__x86_64__)) |
29 |
# if defined(FREEBSD) && (defined(__amd64__) || defined(__x86_64__)) |
30 |
# define X86_64 |
30 |
# define X86_64 |
31 |
# define mach_type_known |
31 |
# define mach_type_known |
32 |
@@ -1647,6 +1651,26 @@ |
32 |
@@ -422,6 +426,10 @@ |
|
|
33 |
# define ARM32 |
34 |
# define mach_type_known |
35 |
# endif |
36 |
+# if defined(FREEBSD) && (defined(mips) || defined(__mips) || defined(_mips)) |
37 |
+# define MIPS |
38 |
+# define mach_type_known |
39 |
+# endif |
40 |
# if defined(bsdi) && (defined(i386) || defined(__i386__)) |
41 |
# define I386 |
42 |
# define BSDI |
43 |
@@ -1647,6 +1655,23 @@ |
33 |
# define DATAEND ((ptr_t)(&_end)) |
44 |
# define DATAEND ((ptr_t)(&_end)) |
34 |
# define DYNAMIC_LOADING |
45 |
# define DYNAMIC_LOADING |
35 |
# endif |
46 |
# endif |
36 |
+# ifdef FREEBSD |
47 |
+# ifdef FREEBSD |
37 |
+# define OS_TYPE "FREEBSD" |
|
|
38 |
+# define ALIGNMENT 4 |
48 |
+# define ALIGNMENT 4 |
|
|
49 |
+# define OS_TYPE "FREEBSD" |
50 |
+# ifndef GC_FREEBSD_THREADS |
51 |
+# define MPROTECT_VDB |
52 |
+# endif |
39 |
+# define SIG_SUSPEND SIGUSR1 |
53 |
+# define SIG_SUSPEND SIGUSR1 |
40 |
+# define SIG_THR_RESTART SIGUSR2 |
54 |
+# define SIG_THR_RESTART SIGUSR2 |
41 |
+# define FREEBSD_STACKBOTTOM |
55 |
+# define FREEBSD_STACKBOTTOM |
Lines 43-62
Link Here
|
43 |
+# define DYNAMIC_LOADING |
57 |
+# define DYNAMIC_LOADING |
44 |
+# endif |
58 |
+# endif |
45 |
+ extern char etext[]; |
59 |
+ extern char etext[]; |
46 |
+ extern char edata[]; |
60 |
+ ptr_t GC_FreeBSDGetDataStart(size_t, ptr_t); |
47 |
+ extern char end[]; |
61 |
+# define DATASTART GC_FreeBSDGetDataStart(0x1000, (ptr_t)etext) |
48 |
+# define NEED_FIND_LIMIT |
62 |
+# define DATASTART_IS_FUNC |
49 |
+# define DATASTART ((ptr_t)(&etext)) |
|
|
50 |
+ ptr_t GC_find_limit(ptr_t, GC_bool); |
51 |
+# define DATAEND (GC_find_limit (DATASTART, TRUE)) |
52 |
+# define DATAEND_IS_FUNC |
53 |
+# define DATASTART2 ((ptr_t)(&edata)) |
54 |
+# define DATAEND2 ((ptr_t)(&end)) |
55 |
+# endif |
63 |
+# endif |
56 |
# if defined(NONSTOP) |
64 |
# if defined(NONSTOP) |
57 |
# define CPP_WORDSZ 32 |
65 |
# define CPP_WORDSZ 32 |
58 |
# define OS_TYPE "NONSTOP" |
66 |
# define OS_TYPE "NONSTOP" |
59 |
@@ -1998,6 +2022,20 @@ |
67 |
@@ -1998,6 +2023,20 @@ |
60 |
extern char _end[]; |
68 |
extern char _end[]; |
61 |
# define DATAEND ((ptr_t)(&_end)) |
69 |
# define DATAEND ((ptr_t)(&_end)) |
62 |
# endif |
70 |
# endif |
Lines 77-79
Link Here
|
77 |
# ifdef NOSYS |
85 |
# ifdef NOSYS |
78 |
/* __data_start is usually defined in the target linker script. */ |
86 |
/* __data_start is usually defined in the target linker script. */ |
79 |
extern int __data_start[]; |
87 |
extern int __data_start[]; |
|
|
88 |
@@ -2059,14 +2098,20 @@ |
89 |
# endif |
90 |
# ifdef FREEBSD |
91 |
/* FreeBSD/arm */ |
92 |
-# define ALIGNMENT 4 |
93 |
# define OS_TYPE "FREEBSD" |
94 |
+# ifndef GC_FREEBSD_THREADS |
95 |
+# define MPROTECT_VDB |
96 |
+# endif |
97 |
+# define SIG_SUSPEND SIGUSR1 |
98 |
+# define SIG_THR_RESTART SIGUSR2 |
99 |
+# define FREEBSD_STACKBOTTOM |
100 |
# ifdef __ELF__ |
101 |
# define DYNAMIC_LOADING |
102 |
# endif |
103 |
-# define HEURISTIC2 |
104 |
extern char etext[]; |
105 |
-# define SEARCH_FOR_DATA_START |
106 |
+ ptr_t GC_FreeBSDGetDataStart(size_t, ptr_t); |
107 |
+# define DATASTART GC_FreeBSDGetDataStart(0x1000, (ptr_t)etext) |
108 |
+# define DATASTART_IS_FUNC |
109 |
# endif |
110 |
# ifdef DARWIN |
111 |
/* iPhone */ |