Due to a bug in the Solaris linker, we need to call the GC_INIT()

scripts/mod2init.sh, runtime/{wrapper.mod,init.h}:
        Due to a bug in the Solaris linker, we need to call the GC_INIT()
        macro from some statically linked part of the code.
        So I've modified mod2init to add an init_gc() function to the init
        file, and I've modified wrapper.mod to call it.
This commit is contained in:
Fergus Henderson
1995-03-18 07:51:34 +00:00
parent dbb4c8213b
commit f79d5f9632

View File

@@ -48,6 +48,16 @@ for mod in $modules; do
echo "extern void $mod(void);";
done
echo "";
echo "#ifdef CONSERVATIVE_GC";
echo "/* This works around a bug in the Solaris 2.X (X <= 4) linker. */";
echo "/* The reason it is here is that it needs to be in statically linked */";
echo "/* code, it won't work if it is in the dynamically linked library. */";
echo "void init_gc(void)";
echo "{";
echo " GC_INIT();";
echo "}";
echo "#endif";
echo "";
echo "void init_modules(void)";
echo "{";
for mod in $modules; do