diff options
author | Zoltan Varga <vargaz@gmail.com> | 2006-04-05 02:54:25 +0400 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2006-04-05 02:54:25 +0400 |
commit | f9183555d4cea352e257e00da895923ce37df605 (patch) | |
tree | 2bf0a5362dd4264aeccc3bab4da3cdcaf2262718 /libgc | |
parent | 4486379ec94bc0b312c406653ff9c7de397816f7 (diff) |
2006-04-05 Zoltan Varga <vargaz@gmail.com>
* include/private/gcconfig.h (LINUX and SPARC): Applied patch from
David S. Miller <davem@davemloft.net>: Do not
use _etest and GC_SysVGetDataStart() to figure out DATASTART.
Instead use either SEARCH_FOR_DATA_START or __environ, based
upon GLIBC version.
svn path=/trunk/mono/; revision=59048
Diffstat (limited to 'libgc')
-rw-r--r-- | libgc/ChangeLog | 8 | ||||
-rw-r--r-- | libgc/include/private/gcconfig.h | 22 |
2 files changed, 23 insertions, 7 deletions
diff --git a/libgc/ChangeLog b/libgc/ChangeLog index ed2e897aa74..6f43e63fa2d 100644 --- a/libgc/ChangeLog +++ b/libgc/ChangeLog @@ -1,3 +1,11 @@ +2006-04-05 Zoltan Varga <vargaz@gmail.com> + + * include/private/gcconfig.h (LINUX and SPARC): Applied patch from + David S. Miller <davem@davemloft.net>: Do not + use _etest and GC_SysVGetDataStart() to figure out DATASTART. + Instead use either SEARCH_FOR_DATA_START or __environ, based + upon GLIBC version. + 2006-03-25 Zoltan Varga <vargaz@gmail.com> * configure.in: Applied patch from David S. Miller <davem@davemloft.net>: Fix support for sparc/linux. diff --git a/libgc/include/private/gcconfig.h b/libgc/include/private/gcconfig.h index 0175a3b2c0a..d278603a338 100644 --- a/libgc/include/private/gcconfig.h +++ b/libgc/include/private/gcconfig.h @@ -990,16 +990,24 @@ # else Linux Sparc/a.out not supported # endif - extern int _end[]; - extern int _etext[]; -# define DATAEND (_end) # define SVR4 - extern ptr_t GC_SysVGetDataStart(); -# ifdef __arch64__ -# define DATASTART GC_SysVGetDataStart(0x100000, _etext) +# include <features.h> +# if defined(__GLIBC__) && __GLIBC__ >= 2 +# define SEARCH_FOR_DATA_START # else -# define DATASTART GC_SysVGetDataStart(0x10000, _etext) + extern char **__environ; +# define DATASTART ((ptr_t)(&__environ)) + /* hideous kludge: __environ is the first */ + /* word in crt0.o, and delimits the start */ + /* of the data segment, no matter which */ + /* ld options were passed through. */ + /* We could use _etext instead, but that */ + /* would include .rodata, which may */ + /* contain large read-only data tables */ + /* that we'd rather not scan. */ # endif + extern int _end[]; +# define DATAEND (_end) # define LINUX_STACKBOTTOM # endif # ifdef OPENBSD |