flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
JohnFound 22 Mar 2004, 23:08
Take a look at Fresh StdcallEx.inc file. There is "proc" macro that create procedure only if it is used in the code. All Fresh libraries are created this way to avoid unused code in the executable.
Regards. |
|||
![]() |
|
f0dder 22 Mar 2004, 23:19
Hm, how does this work? I'm not a guru at fasm macros
![]() If this assumption is correct, I'm afraid it won't do the trick for me - I need all the function code to go in the output COFF object, and the elimination to be done at link time. If this is what is actually happening, sorry for my ignorance and newbieness wrt. fasm macros ![]() If it's the assemble-time elimination that's being done, it's not what I need - but thanks nevertheless ![]() |
|||
![]() |
|
JohnFound 22 Mar 2004, 23:25
Yea, you are right, it wont work in link time. IMHO, only procedures in precompiled libraryes (.LIB) are eliminating from linker. You should take a look at some tool that creates ".LIB" from several .COFF object files. I am afraid that I can't help you, because I never use neither .obj nor .lib files.
![]() Regards |
|||
![]() |
|
f0dder 22 Mar 2004, 23:39
I already know about the library approach, and it's what I've used in the past with other assemblers. It gets a bit tedious when you have a relatively large amount of functions. For instance, it would be nice to group a lot of string related things into a single module, but still have only the used parts linked in. I know it's possible, since the microsoft C++ compiler can generate the necessary data items to support link-time code elimination.
I prefer .obj and .lib, since it makes the build process faster. Fasm is already fast, but for huge projects it would obviously still be faster to only re-assemble changed modules. It is of course even more important when your primary language is a HLL with a "slow" compiler ![]() I can live with the typical "create a zillion objs and stuff them in a lib" approach, but it would be nice with the link-time optimization. Means less rules in the makefile... never seen an assembler supporting the necessary constructs, and thought fasm would be a place to look, since it's powerful, well supported, and under constant development. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.