Weird Activation Records (Fixed!)

Wolfgang Thaller wolfgang.thaller@gmx.net
Wed, 6 Mar 2002 19:00:51 +0100


>I'd be willing to bet large amounts of money that this is due to the
>macro LOOKS_LIKE_GHC_INFO() returning the wrong value.  [...]

Well, you would have won large amounts of money had I accepted the bet.
It turns out to have been entirely due to my own stupidity. I had mistyped
the #ifdef darwin_TARGET_OS in Main.c where I put the code that was 
supposed to figure out the etext and edata adresses (I copied the 
code from the GHC 5.00.2 port, so I didn't double-check if it was 
really getting compiled after all...).

If got the mangler to produce working code at least in some cases - I 
still have to chase after a segfault in one larger program that I 
tried to compile.

Due too my lack of Perl knowledge, I didn't yet manage to remove the 
jumps from the slow to the fast entry points, and a function called 
__DISCARD__ must be present for linking (it's never called, though).
Should the old PowerPC code in the mangler be kept there? It assumes 
a slightly different assembler dialect and a completely different 
linker, and as it just asks for $TargetPlatform =~ /^powerpc|rs6000/, 
it keeps getting in the way...

That's it for now, I'm going after that segfault...

Cheers,

Wolfgang