[Gc] HP NonStop S-Series - Patch for Version 6.8

Craig McDaniel craigmcd at gmail.com
Fri Mar 23 12:46:47 PST 2007


I discovered that my previous contribution that added support for the HP
NonStop S-Series was incomplete. The method for determined the end of
the data segment did not always work for global variables. The patch
included below for version 6.8 passes all tests:


--- gc6.8/include/private/gcconfig.h
+++ gc6.8-mymods/include/private/gcconfig.h
@@ -1470,8 +1470,8 @@
 #    define OS_TYPE "NONSTOP"
 #    define ALIGNMENT 4
 #    define DATASTART ((ptr_t) 0x08000000)
-     extern int _end[];
-#    define DATAEND (_end)
+     extern char **environ;
+#    define DATAEND ((ptr_t)(environ - 0x10))
 #    define STACKBOTTOM ((ptr_t) 0x4fffffff)
 #    define USE_GENERIC_PUSH_REGS
 #   endif


Craig McDaniel



More information about the Gc mailing list