The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: jdoe on June 03, 2007, 06:23:27 PM

Title: ML.EXE and Object File
Post by: jdoe on June 03, 2007, 06:23:27 PM
Hi,

I'm working on a static library and notice that the size of my .lib file was different depending on what version of MASM I was using. What I found is that the full path of all my .asm files are stored in the object file with the latest MASM 8.0 which make my static library to be 10k larger (52k --> 62k).

I tried to put ML.EXE in the path environment, use a @commandfile or anything that could gives to ML only the file name and not the full path but without success.




FOR %%A IN (*.ASM) DO (
  %BINPATH%\ML.EXE /c /coff /Cp /Gz /nologo %%~nxA
)

%BINPATH%\LINK.EXE -lib /NOLOGO /OUT:AZMT.LIB *.OBJ




Is it a known behavior of MASM 8.0 and is there a workaround ?

Thanks

Title: Re: ML.EXE and Object File
Post by: Vortex on June 03, 2007, 06:50:16 PM
Sorry for my question but what's the problem with the overhead of 10Kb in your static library?
Title: Re: ML.EXE and Object File
Post by: jdoe on June 03, 2007, 07:40:10 PM
Quote from: Vortex on June 03, 2007, 06:50:16 PM
Sorry for my question but what's the problem with the overhead of 10Kb in your static library?

I know 10k is no big deal but I'm planning to distribute this library and the real reason that I asked about this is not really the overhead (it was not clear in my previous post, sorry) is the information about my drive beeing included. It's not a big deal either but I personally don't like that.

I know after all that the problem is more a "ME" behavior. I'm used to stumble on the flowers of the carpet.   :P

Title: Re: ML.EXE and Object File
Post by: MichaelW on June 03, 2007, 08:24:52 PM
For the final build could you put all of your asm files on a short path, say in the root directory?
Title: Re: ML.EXE and Object File
Post by: Tedd on June 04, 2007, 01:15:13 PM
It's probably some extra symbol/debug information that's included - how to strip it out, or not include it in the first place, is another matter ::)
Title: Re: ML.EXE and Object File
Post by: Vortex on June 04, 2007, 05:11:11 PM
Jdoe,

Masm object files are always containing a debug section with MS' copyright message. You should code a tool to remove this section.
Title: Re: ML.EXE and Object File
Post by: jdoe on June 04, 2007, 08:08:07 PM
Quote from: MichaelW on June 03, 2007, 08:24:52 PM
For the final build could you put all of your asm files on a short path, say in the root directory?

That would be the best workaround for sure.

Quote
Masm object files are always containing a debug section with MS' copyright message. You should code a tool to remove this section.

If I do that, I will see myself as insane.  :P


As you all see, I don't have a long background using Microsoft binaries and I was asking just in case I missed some informations. I'm gonna live with it.


Thanks you all for your comments.

Title: Re: ML.EXE and Object File
Post by: hutch-- on June 05, 2007, 12:30:00 AM
jdoe,

I would not be afraid to supply a library that is a bit bigger than ones built with object modules from ealier masm version as in the final target there is no differnce in size. I actually keep te facilities avaiable to use any masm version from 6.14 to 8.0 and in most instances I cannot tell the difference. When I build libraries I usually use the old 6.14 as it is supplied in the masm32 project.
Title: Re: ML.EXE and Object File
Post by: Vortex on June 05, 2007, 05:51:02 PM
jdoe,

Did you try to use PoAsm? Does it make it a difference?
Title: Re: ML.EXE and Object File
Post by: jdoe on June 05, 2007, 07:50:14 PM
Vortex,

Thanks for your idea but PoAsm is not fully compatible with MASM syntax and thats why I'm not using it for the moment. If it was, I think I would be a user.