2006-04-05 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Tue, 4 Apr 2006 22:54:25 +0000 (22:54 -0000)
committerZoltan Varga <vargaz@gmail.com>
Tue, 4 Apr 2006 22:54:25 +0000 (22:54 -0000)
* 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

libgc/ChangeLog
libgc/include/private/gcconfig.h

index ed2e897aa7484bf8f38f62a12afe2b835bd4afc7..6f43e63fa2d555cf91193dd9535dc62eca399e65 100644 (file)
@@ -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.
index 0175a3b2c0afe1cec53ceaf446f0dea37d3fe7d9..d278603a338f69976bb73ea8abafe67278f16d28 100644 (file)
 #     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