flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
JohnFound
Well, AFAIK, it is the linker job to link library to your COFF files. You have to read FASM manual for COFF format directives.
|
|||
![]() |
|
Snowbit
It means that I must write all project as COFF and then link it to EXE (for example with GoAsm)?
But can I link library without it (in PE Format)? |
|||
![]() |
|
JohnFound
Snowbit wrote: But can I link library without it (in PE Format)? No, you can't - you can build PE directly and use only source level libraries, or create COFF and link with external linker. IMHO, it is not a big problem to convert masm sources to FASM and to include them in the project. Regards. |
|||
![]() |
|
Vortex
Snowbit,
You can link easly Fasm COFF object files with MS Link, Pelle's linker or GoLink. Have a look at these threads for some examples: http://board.flatassembler.net/topic.php?t=588 http://board.flatassembler.net/topic.php?t=479 _________________ Code it... That's all... |
|||
![]() |
|
Snowbit
It is bad
![]() Yes, it isn't big problem to convert masm sources to FASM, but converting over 1000 lines of code isn't right way for me... Anyway, thx for answers ![]() |
|||
![]() |
|
JohnFound
Snowbit wrote: It is bad Well, as I wrote in the post above (and Vortex too), you still can compile to COFF with FASM and link it with every other COFF, LIB, even HLL generated. Note, that direct PE creation is option that you can't get with MASM at all. Actually, I know only two assemblers that can directly create PE executables - FASM and RosAsm. Regards. |
|||
![]() |
|
Vortex
Hi JohnFound,
There is also the Sphinx C-- compiler which is able to create directly PE files without the need of an external linker. C-- is a hybrid of C and asm languages. _________________ Code it... That's all... |
|||
![]() |
|
donn
This is a very old thread, but I was looking for an answer on the same topic.
I have a COFF written in fasm which contains a couple incs with functions that become exported. I'm curious if there is a way to import these into a fasm PE similar to how DLL functions are imported. That way, I could continue building out more COFF functions and minimally supplement the functions with an extra import signature. I've tried a few things, but not sure if I'm on the wrong track here. Thanks a lot, will keep researching |
|||
![]() |
|
bitRAKE
There are a number of solutions:
A. Build a DLL from COFF functions, and import these into existing PE at runtime. B. Convert PE to COFF, and use a linker to merge all COFF to final PE. (As stated in this thread above.) Good luck on your project. |
|||
![]() |
|
donn
Got it, thanks!
C:\Users\Folder>link /SUBSYSTEM:WINDOWS /ENTRY:start executableName.OBJ coffName.obj "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\User32.Lib " "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib\Kernel32.Lib" Microsoft (R) Incremental Linker Version 14.00.23026.0 Copyright (C) Microsoft Corporation. All rights reserved. Very quick too, just an extra extrn to re-import the function labels. Appreciated |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.