__stginit_Foo

Wolfgang Thaller wolfgang.thaller at gmx.net
Tue Apr 26 15:04:25 EDT 2005


> Removing __stginit_Foo is all very well, but unfortunately those 
> symbols
> 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
> reason?

Uhm, right.
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 
something like
	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.

Cheers,

Wolfgang



More information about the Cvs-ghc mailing list