wolfgang.thaller at gmx.net
Tue Apr 26 15:04:25 EDT 2005
> Removing __stginit_Foo is all very well, but unfortunately those
> are part of our documented FFI interface(!). See for example
> ccall/should_run/ffi002_c.c in the test suite.
> Perhaps we should keep a dummy __stginit_Foo in each module for this
Yes, a dummy __stginit_Foo is the only way I can think of.
It shouldn't be empty though, as empty symbols at the end of a section
sometimes cause trouble; it could either contain .long 0 or even
Sp = Sp + 4;
jump (I32[Sp + (-4)]);
... so that we don't need to duplicate the "do we need stginit" logic
in the RTS.
Having a dummy __stginit_Foo would also allow us to revert the hack I
committed to ghc-split for dealing with empty .s files.
More information about the Cvs-ghc