Instead of using a data symbol to find the last mapped section of the
executable, use _end. This is done other places in the file, and works with latest ELF linker changes, (This only affects OpenBSD/ELF). ok todd@
This commit is contained in:
parent
f2c8e075bb
commit
f5ecdc2e7a
15
devel/boehm-gc/patches/patch-misc_c
Normal file
15
devel/boehm-gc/patches/patch-misc_c
Normal file
@ -0,0 +1,15 @@
|
||||
$OpenBSD: patch-misc_c,v 1.3 2003/01/17 21:00:45 drahn Exp $
|
||||
--- misc.c.orig Mon Aug 5 19:13:44 2002
|
||||
+++ misc.c Thu Jan 9 16:12:10 2003
|
||||
@@ -591,7 +591,10 @@ void GC_init_inner()
|
||||
# if defined(SEARCH_FOR_DATA_START)
|
||||
GC_init_linux_data_start();
|
||||
# endif
|
||||
-# if (defined(NETBSD) || defined(OPENBSD)) && defined(__ELF__)
|
||||
+# if defined(OPENBSD) && defined(__ELF__)
|
||||
+ GC_init_openbsd_elf();
|
||||
+# endif
|
||||
+# if defined(NETBSD) && defined(__ELF__)
|
||||
GC_init_netbsd_elf();
|
||||
# endif
|
||||
# if defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS)
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-os_dep_c,v 1.2 2002/10/26 13:25:26 todd Exp $
|
||||
$OpenBSD: patch-os_dep_c,v 1.3 2003/01/17 21:00:45 drahn Exp $
|
||||
--- os_dep.c.orig Wed Jul 31 17:13:18 2002
|
||||
+++ os_dep.c Fri Oct 25 12:30:33 2002
|
||||
@@ -233,6 +233,19 @@ static void *tiny_sbrk(ptrdiff_t increme
|
||||
+++ os_dep.c Thu Jan 9 16:14:45 2003
|
||||
@@ -233,6 +233,18 @@ static void *tiny_sbrk(ptrdiff_t increme
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -11,10 +11,9 @@ $OpenBSD: patch-os_dep_c,v 1.2 2002/10/26 13:25:26 todd Exp $
|
||||
+ void GC_init_openbsd_elf()
|
||||
+ {
|
||||
+ extern ptr_t GC_find_limit();
|
||||
+ extern char **environ;
|
||||
+ /* This may need to be environ, without the underscore, for */
|
||||
+ /* some versions. */
|
||||
+ GC_data_start = GC_find_limit((ptr_t)&environ, FALSE);
|
||||
+ GC_data_start = GC_find_limit((ptr_t)&end, FALSE);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
|
Loading…
Reference in New Issue
Block a user