Yasm working with Win32

Peter Tanski <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.all
Message-ID <F0A07A1A-F683-42E9-907D-2F37E560F99A__46848.4203484424$1165780920$gmane$org@gmail.com>
I thought you might like to know that after the Yasm developer, Peter  
Johnson, added support for complex relocations and a little testing,  
Yasm now works for Win32 (and, presumably Win64 but I am not able to  
test that far).  To try it yourself, grab the latest development  
snapshot, 'yasm-r1705.exe' or later from http://cvs.tortall.net/ 
projects/yasm/snapshots/r1705/ .

There is one caveat: the Yasm-output object file with complex  
relocations results in extra symbols that cause the Windows loader to  
choke.  You need to strip all symbols ('ld -s ...') after assembling  
the object file.

Here is an example session:

(in MSYS):
 > ghc -pgma "yasm-r1705" -opta "-a x86" -opta "-p gas" -opta "-f  
win32" -optl-s hello.hs -o hello
--yasm will complain that it does not recognise the "-c" option; this  
is an artifact in GHC

 > hello
yasm works!

Notes:
architecture: -a x86 (i386)
parser: -g gas
obj format: -f win32 (win32-COFF)

Next on the list is to get GHC to build using Yasm and test it...

Cheers,
Pete
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.