From f5ecdc2e7a565148bd36c13f015701887374af83 Mon Sep 17 00:00:00 2001 From: drahn Date: Fri, 17 Jan 2003 21:00:45 +0000 Subject: [PATCH] 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@ --- devel/boehm-gc/patches/patch-misc_c | 15 +++++++++++++++ devel/boehm-gc/patches/patch-os_dep_c | 9 ++++----- 2 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 devel/boehm-gc/patches/patch-misc_c diff --git a/devel/boehm-gc/patches/patch-misc_c b/devel/boehm-gc/patches/patch-misc_c new file mode 100644 index 00000000000..f6e6d99467c --- /dev/null +++ b/devel/boehm-gc/patches/patch-misc_c @@ -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) diff --git a/devel/boehm-gc/patches/patch-os_dep_c b/devel/boehm-gc/patches/patch-os_dep_c index 27254002069..5abcb7de73a 100644 --- a/devel/boehm-gc/patches/patch-os_dep_c +++ b/devel/boehm-gc/patches/patch-os_dep_c @@ -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 +