The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: n00b! on January 26, 2009, 11:10:37 PM

Title: Small Exe (/MERGE)
Post by: n00b! on January 26, 2009, 11:10:37 PM
Hi,
I read that if you merge sections with the microsoft MASM-linker the exe will be smaller.
I tried it and it actually worked, but now I have the problem that I'm currently using Pascal, which uses Borland's tasm with tlink afaik and it seems to do not support this linker-command.
(I mean this is a PE format thing, the pascal linker should be able to do something like this, shouldn't it?...)
I hope somebody can help me to get some sections merged with this linker to produce a smaller exe, thanks!
Title: Re: Small Exe (/MERGE)
Post by: Vortex on January 27, 2009, 06:31:06 PM
You should try Agner Fog's objconv tool (http://agner.org/optimize/objconv.zip) to convert OMF to MS COFF. While Borland tools are producing OMF type object modules, the standard for MS tools ( and for ml.exe ) is the MS COFF specification. Note that MS link has the ability to do the same convertion. If I remember well, Borland Pascal is limited only with 16-bit code. The OMF to COFF convertion is targeting 32-bit object modules.
Title: Re: Small Exe (/MERGE)
Post by: n00b! on January 28, 2009, 03:27:09 PM
So it won't be possible without any third party linker?
That would be sad, thx anyway.
Title: Re: Small Exe (/MERGE)
Post by: Vortex on January 28, 2009, 06:40:46 PM
n00b!,

You need to check if your development tools are producing 32-bit code or not.

Title: Re: Small Exe (/MERGE)
Post by: n00b! on January 28, 2009, 11:44:39 PM
Both ways it wouldn't work with the original linker, so if it's 16Bit or 32Bit is some kind of secondary.
But how would this has an effect, 16Bit or 32Bit? *sorry*