flat assembler
Message board for the users of flat assembler.

Index > Windows > Cross compiling and testing windows apps in Linux

Author
Thread Post new topic Reply to topic
Thaorius



Joined: 27 Jul 2006
Posts: 42
Thaorius
Hi guys, I need to make a program for windows in ASM, however I haven't used a windows system in eons and there for I don't have a running one anymore. The question is, how could I make the application on linux, compile it for windows and test it on a windows environment, without using a full blown virtual machine?

I know fasm produces EXE/ELF invariably of the running machine's OS, but I need to separate the object generation and linker, there for I would be generating FASM to generate object code and a linker to build the exe, however ld doesn't really generate EXE files. And even if I get a windows linker to run under wine, I still need to run the app, which is kinda bogus on wine.

So, any recommendation guys?

Thanks for your time.
Post 23 Aug 2009, 23:25
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17667
Location: In your JS exploiting you and your system
revolution
Are you asking to use a Windows linker and a Windows OS to test your exe, but without using a Windows VM or WINE?

You haven't really given yourself many other options. I guess the only other option would be to run Windows for real on another machine.
Post 24 Aug 2009, 00:01
View user's profile Send private message Visit poster's website Reply with quote
Fanael



Joined: 03 Jul 2009
Posts: 168
Fanael
Build binutils for target i686-pc-cygwin, then you'll obtain version of ld (called i686-pc-cygwin-ld), which generates PE instead of ELF. Of course, wine will be still needed to run the generated .exe file.
Post 24 Aug 2009, 00:02
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Do you have a real need for a linker? fasm can generate a PE file straight. For instance, all the examples in the fasm Windows package will produce an executable from Linux using fasm alone (with the exception of the MSCOFF example).
Post 24 Aug 2009, 00:20
View user's profile Send private message Reply with quote
Thaorius



Joined: 27 Jul 2006
Posts: 42
Thaorius
@LocoDelAssembly: Yeah, I sadly need a linker, I have to link with some object code I have no sources for and as I understood it, FASM won't do the linker's job in such cases. (A proposito: Buenos Aires?).

@Fanael: I'll check it out in a minute, sounds viable.

@revolution: Ideally, yes, but I see I probably have not much of a choice but to use WINE, since otherwise I would need to sacrifice one of my systems and install windows in it.

Speaking of WINE, how accurately is it emulating windows? I mean, I have to load a DLL inside a running, 3rd party process, as this program needs to monitor certain calls made by this program, and I'm not sure I'll be able to run the program in question in WINE or that WINE will let me inject the DLL as I would in a real Win32 system (I would love to tell you what the program is, but I have a signed NDA, can't say much :S)

Thanks for the help.
Post 24 Aug 2009, 00:38
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
Quote:

(A proposito: Buenos Aires?).
La Plata.

I would go for a real Windows, inside a virtual machine if you have to. Using WINE to test if it will work on a real Win32 is too risky considering the kind of task you want to perform.
Post 24 Aug 2009, 01:07
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.