error "expression too complex"; complex relocation? (correction)

Peter Johnson peter at tortall.net
Sun Dec 10 13:44:26 PST 2006


On Sun, 10 Dec 2006, Peter Tanski wrote:
> I tested the fix using the original GHC-output assembler file, "hello.s" and 
> found that Windows will complain that the final executable is not a valid 
> Win32 executable (Mdbg issues an Exception: "HRESULT: ... 0x800700C1").  The 
> problem was with some sections--possibly .stab ? I did not request any debug 
> info from Yasm--that the Windows loader has trouble with.  After relinking 
> the same object file by passing Mingw's 'ld' the "-s" option to strip all 
> debugging symbols everything ran fine...  For example:

Can you send me (directly rather than to the list is fine) the hello.s 
file and the good and bad executable files?  I'll take a look at it and 
see if I can figure out what's causing Windows such problems and if 
there's anything Yasm can do to fix it.

> If there is anything I can do to help further, let me know.  Right now I am 
> attempting to port the build and Native Code Generation for Ghc to use Yasm. 
> I am much more knowledgeable about PowerPC, however, since I do the bulk of 
> my development work on Mac OS X.  (It would be nice to port Yasm to OS X and 
> then add PPC output, but I'm a bit short of time at the moment.)

Yasm already runs quite well on OS X (a simple configure and make should 
work fine).  I do plan on adding PPC support eventually; I've got a 
work-in-progress code generator (written in Python) that generates the 
instruction tables for PPC but not the rest of the yasm_arch code.  It'll 
probably be faster in the short term to just write that part manually, but 
in the long term I'd like to see it auto-generated as well (so other 
similar RISC architectures can be easily supported).

Let me know if you'd be interested in picking this up when you have more 
time, and I can send you my work-in-progress stuff.  Come to think of it, 
I should probably commit my code to a SVN branch so it doesn't get lost.

Peter


More information about the yasm-devel mailing list