My goal is to eliminate from project functions and data that is never referenced.
And linker option /OPT:REF is exactly for this.
But can't force linker to understand it.
Link's version is 5.012.8078.0 (from masm32 package).
Asmvars by J.Collake is good but don't scan for unreferenced functions.
May be is there some tools for this? And what's wrong with /OPT:REF?
Thanks.
Posted on 2002-08-04 08:03:25 by Four-F
Let me guess. You put all your code in one big source file (or maybe a few files) and you want to use the linker option to remove unnecessary parts. Right?

That does not work unless you use Visual C/C++. It is not linker's fault. It is not MASM's fault, either. MASM is just too old to exploit Microsoft's own extention of COFF object file format.

The solution is;
you have to separate all of your PROCs into separate files, assemble each of them, create a library, then link the library. There is no other way to achieve what you want at this time.

AFAIK, the only compiler exploits the Microsoft extension of COFF format is Visual C/C++. So, don't bother to use '/opt:ref' with your asm files.
Posted on 2002-08-05 14:14:12 by Starless