Hi, I'm really new here. Please don't blame me if this question seems to be silly.

I sure we can write win32 assembly using GAS , LD and many other good tools comes with binutils, because MinGW could compile C programs via binutils.

The GNU stuff has been ported to many plat-form, what a good thing that we can code in multi-OS with the same experience, at least the same Syntax.

But how to config the ldscripts of LD to fit the win32 assembly enviroment? I serached a lot, no found.

Indeed, I have wasted a lot of time for choosing tools...

Any comments will be helpful. thanks.
Posted on 2004-06-03 02:38:50 by em_fans
Yes, you can but I don't know how
Posted on 2004-06-03 11:51:24 by greenant
What's the point? You're still tied to x86 when writing assembly, and GAS is a pretty awful assembler... ldscript won't need much change anyway, but you'll need a version of the binutils crap configured to support win32-pe output.
Posted on 2004-06-03 13:09:37 by f0dder
Compiling a Win32 app in GAS is absolutely the same as compiling a .c file . Your file needs to be with .s extension (not .asm) , and probably you just need
"gcc.exe mycode.s "

If you use Win, not linux, you need the http://www.cygwin.com/
And I seriously doubt you need to use any scripts, as long as the gcc.exe has been setup for win32 target development.
Maybe this http://www.xraylith.wisc.edu/~khan/software/gnu-win32/gcc.html can help a bit, though it's not the latest version.

f0dder's absolutely right - writing asm in GAS is damn AWFUL . You can only lose if you don't immediately choose another assembler.
I myself am stuck with gas, since I'm now coding high-performance procs for some handhelds. And I couldn't take it more than 2 weeks (good that there's NASM for that platform) - in the Electronics section I posted a preprocessor to make development much faster.
Again, make sure you choose anything but GAS.
Posted on 2004-06-03 13:14:47 by Ultrano
The MinGW package is an alternative to using Cygwin.
I've uploaded a GAS example program. Take a look at the makefile!
Posted on 2004-06-03 15:11:27 by Poimander
Cygwin is overkill for one application. Use MinGW.
Posted on 2004-06-03 20:44:29 by SpooK
Or you can use fasm and simplify your life either in Linux or in Windows.

You can assemble the same source in both systems with identical result and it's syntax is really optimal.

And YES it is not GNU but is freeware with artistic license. :alright:
Posted on 2004-06-03 23:32:13 by pelaillo
Thanks for *ALL* your advice and I'm trying to use Fasm.
Posted on 2004-07-29 19:06:09 by em_fans