simonmar 2002/07/16 07:56:11 PDT
Modified files:
ghc/includes StgMacros.h
ghc/rts StgStartup.hc
ghc/compiler/absCSyn AbsCSyn.lhs AbsCUtils.lhs CLabel.lhs
PprAbsC.lhs
ghc/compiler/codeGen CodeGen.lhs
ghc/compiler/compMan CompManager.lhs
ghc/compiler/main HscMain.lhs HscTypes.lhs
ghc/compiler/nativeGen AbsCStixGen.lhs
Log:
Implement a primitive failsafe mechanism for protecting against
linking inconsistent object files. The idea is that if object files
which were compiled in the wrong order (non-dependency order) or
compiled in different ways (eg. profiled vs. non-profiled) are linked
together, a link error will result.
This is achieved by adding the module version and the way to the
module init label. For example, previously the init label for a
module Foo was named
__stginit_Foo
now it is named
__stginit_Foo_<version>_<way>
where <version> is the module version of Foo (same as the version in
the interface file), and <way> is the current way (or empty).
We also have to have a way to refer to the old plain init label, for
using as the argument to shutdownHaskell() in a program using foreign
exports. So the old label now points to a jump instruction which
transfers control to the new init code.
Revision Changes Path
1.47 +39 -3 fptools/ghc/includes/StgMacros.h
1.19 +1 -6 fptools/ghc/rts/StgStartup.hc
1.48 +3 -2 fptools/ghc/compiler/absCSyn/AbsCSyn.lhs
1.52 +1 -1 fptools/ghc/compiler/absCSyn/AbsCUtils.lhs
1.53 +23 -7 fptools/ghc/compiler/absCSyn/CLabel.lhs
1.91 +4 -3 fptools/ghc/compiler/absCSyn/PprAbsC.lhs
1.48 +47 -33 fptools/ghc/compiler/codeGen/CodeGen.lhs
1.113 +1 -1 fptools/ghc/compiler/compMan/CompManager.lhs
1.163 +10 -4 fptools/ghc/compiler/main/HscMain.lhs
1.94 +6 -5 fptools/ghc/compiler/main/HscTypes.lhs
1.51 +3 -1 fptools/ghc/compiler/nativeGen/AbsCStixGen.lhs
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc