flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
vid 24 Oct 2007, 00:00
Quote: PE files linkable with FASM PE files linkable how? you mean DLL? |
|||
![]() |
|
Yug3sh 24 Oct 2007, 00:43
vid wrote:
No, a DLL is normally just a PE file. I mean generate an OMF (object file) with FASM and link it using the C compiler's linker with the appropriate C compiler generated object files to create an x64 PE file. |
|||
![]() |
|
bogdanontanu 24 Oct 2007, 00:46
OMF does not support 64 bits, only 32 bits.
As far as I know, FASM generates COFF object files but not OMF. Last edited by bogdanontanu on 24 Oct 2007, 00:48; edited 1 time in total |
|||
![]() |
|
vid 24 Oct 2007, 00:47
FASM doesn't generate OMF object files. It generates COFF object files (or more precisely, microsoft's version of COFF standard).
As to your main question, I don't know about free tools, sorry... |
|||
![]() |
|
Yug3sh 24 Oct 2007, 03:02
Thanks for the responses. I guess I'll have to find the COFF specifications for 64 bit and keep hunting for a free x64 C compiler.
|
|||
![]() |
|
Xorpd! 24 Oct 2007, 04:09
There are so many x64 C compilers. You can get one from Microsoft's website -- when you download MSVC++ 5.0 Express Edition there is also an SDK or something they offer as well, and the AMD64 version has a 64-bit C compiler. There is also a 64-bit gcc; I could dig up the reference if you would like. Intel lets you download a 30-day trial of their C++ compiler, I think. Some of the other commercial vendors may have C++ and trial periods, as well. Fasm will link OK with any of these. If you want to use ld.exe instead of link.exe to link the gcc object files you may need to decorate the names in FASM. If you encounter problems use dumpbin.exe to see what names the two sides want.
|
|||
![]() |
|
Yug3sh 24 Oct 2007, 04:14
Xorpd! wrote: There are so many x64 C compilers. You can get one from Microsoft's website -- when you download MSVC++ 5.0 Express Edition there is also an SDK or something they offer as well, and the AMD64 version has a 64-bit C compiler. There is also a 64-bit gcc; I could dig up the reference if you would like. Intel lets you download a 30-day trial of their C++ compiler, I think. Some of the other commercial vendors may have C++ and trial periods, as well. Fasm will link OK with any of these. If you want to use ld.exe instead of link.exe to link the gcc object files you may need to decorate the names in FASM. If you encounter problems use dumpbin.exe to see what names the two sides want. Thanks Xorpd. I believe the express edition of VC++ does not support generating x64 binaries without some hacking (installing the SDK and doing a couple other things). I am using windows, so have tried the cygwin and mingw versions of GCC but couldn't generate x64 binaries for some reason. It seems as though those versions of GCC were built without x64 support. I'd prefer to steer clear of trial versions. If you have a link to a version of GCC that will run on windows and generate x64 binaries, then I would really appreciate it!!! |
|||
![]() |
|
Xorpd! 24 Oct 2007, 05:35
Installing the SDK isn't what I would consider hacking. I found 'cl.exe' at a couple of locations in my hard disk:
C:\WinDDK\6000\bin\x86\amd64\cl.exe C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\win64\x86\AMD64\cl.exe The first was from downloading some monster DDK from microsoft. It also had a more recent version of ml64.exe (cue boos) than the second, which I got with the SDK, as you surmised. You need the microsoft stuff to get their link.exe in any case. I'm not sure if ld.exe is interoperable with everything in Windows. gfortran comes with gcc, as, and ld (but not g++). Experimental, use at your own risk. |
|||
![]() |
|
f0dder 24 Oct 2007, 09:21
You could of course try rebuilding gcc + bintools yourself, but good luck with that - I'd suggest going for the Microsoft tools, after of course checking the SDK license to see if it's compatible with your needs.
|
|||
![]() |
|
Yug3sh 24 Oct 2007, 17:32
Xorpd! wrote: Installing the SDK isn't what I would consider hacking. I found 'cl.exe' at a couple of locations in my hard disk: Thanks Xorpd. I managed to get gcc to compile and link. For some reason, I can't just run gcc file.c and have it create me an .exe. I get an error: ld: crt2.o: No such file: No such file or directory My lib path is set correct. I can run gcc -c file.c and ld file.o and that works. On a slightly different note, is there a way to use gcc to generate an elf binary and /or a flat binary (located to a specific address)? Last edited by Yug3sh on 24 Oct 2007, 17:37; edited 1 time in total |
|||
![]() |
|
Yug3sh 24 Oct 2007, 17:34
f0dder wrote: You could of course try rebuilding gcc + bintools yourself, but good luck with that - I'd suggest going for the Microsoft tools, after of course checking the SDK license to see if it's compatible with your needs. Thanks F0dder. I've managed to get the version of gcc that Xorpd pointed me to to generate a 64 bit exe. I'm not sure how open the MS license terms are, so would rather not use MS tools if I don't have to. I've previously used OpenWatcom as my compiler, however it currently does not support generating x64 binaries. |
|||
![]() |
|
nocona 27 Oct 2007, 04:17
Quote:
i think you can, but that is the task for ld. try read the full ld doc on ld script. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.