News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Linkers

Started by StarsInTheSky, May 09, 2015, 12:07:53 PM

Previous topic - Next topic

StarsInTheSky

I am sensing a bit of dissatisfaction with the linkers. But I have trouble finding and testing them.
I have read several times in tutorials trying to optimize the size of an exe that the linkers do them little favor.

Please suggest your favorite windows linker and I will add them to this list. Also a link to the vendor so we know where to get it:

1. Link.exe, Microsoft visual studio, microsoft.com
2. Polink.exe, Pelles C, pellesc.de
3. LLD, LLVM open source project, llvm.org
4. Wlink, Open watcom, openwatcom.org
5. GoLink, Go tools, godevtool.com
6. LD.exe, GNU Binutils, mingw.org

Thank you

hutch--

Microsoft linkers vary with the version, you tend to use the linker that is compatible with the version of ML.EXE that you are using. Some versions did odd things with file alignment that bloated the size but you can set that once you know the options. Run "link /?" to get the options.

POLINK is an excellent tool and in that case, use the latest version.

I can't help you with the other two as I don't use them, from memory the GCC LD.EXE did not handle resources.

jj2007

The old link.exe version 6.14 that comes pre-installed with Masm32 does a very good job.

Recent versions of polink are also fine.

In rare cases, you might need to use the combination of JWasm and link version 10 in order to get proper symbols, but collecting the right ms*.dll files is a major nuisance.


StarsInTheSky

I added the ones missing, gcc ld and golink. thank you :)
Not sure if I should exand the chart with versions, like good versions, bad versions.
Like if link v6.14 and v10 is mentioned to be working well.
But then need all versions of everything, and not all are significant. so dont know..

hutch--

Something you need to understand, linkers are not like musical chairs, they are often object module specific on a brand by brand basis. If you are using the GNU "as" assembler (GAS) use the GNU linker, if you are assembling code with the old TASM, use a Borland linker and if you are using a Microsoft assembler or compatible, use a Microsoft linker. In the case of POASM, it is specifically a Microsoft format COFF linker which is usually more up to date than Microsoft LINK.

I cannot comment of the Open Watcom linker as I have never used it.

Playing with linkers without understanding the differences risks multiple mistakes and incompatibilities and code that does not work. Learn each tool one at a time and you will get reliable results.

StarsInTheSky

 then the list can't be used as I imagined. thank you hutch..