From: Zoltan Varga Date: Tue, 4 Apr 2006 22:54:25 +0000 (+0000) Subject: 2006-04-05 Zoltan Varga X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d6f8ad27f054ce9d8a514c201a4b545dfdbf3054;p=gc 2006-04-05 Zoltan Varga * include/private/gcconfig.h (LINUX and SPARC): Applied patch from David S. Miller : 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 --- diff --git a/ChangeLog b/ChangeLog index cba05e52..3a57e110 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-04-05 Zoltan Varga + + * include/private/gcconfig.h (LINUX and SPARC): Applied patch from + David S. Miller : 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 * configure.in: Applied patch from David S. Miller : Fix support for sparc/linux. diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 0175a3b2..d278603a 100644 --- a/include/private/gcconfig.h +++ b/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 +# 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