The MASM Forum Archive 2004 to 2012

Project Support Forums => GoAsm Assembler and Tools => Topic started by: PauloH on May 20, 2010, 02:35:02 AM

Title: Golink goes wrong when linking Jwasm 64 bits file.
Post by: PauloH on May 20, 2010, 02:35:02 AM
    Hi,

I did a 64 bits program using Jwasm and tried to link it with golink without success, but with polink the linking process is successfull.

I use Vista 64 home premium.

The project (for RadAsm) is attached. There are two build.bat files to do the compilation. Perhaps you have to change the path inside them.

My question is: what am I doing wrong? Is there any switch I'm missing?

I want to use golink to be free of .lib files!

Thanks for your help.

Paulo H. Duarte

PS.: Golink+Jwasm 32 bits programming goes without any issue!
Title: Re: Golink goes wrong when linking Jwasm 64 bits file.
Post by: wjr on May 22, 2010, 03:48:28 AM
If you zip up your DialogAsMain64.obj and DialogAsMain64.res it would be easier for me to try to duplicate any errors or difficulties that you encountered using GoLink...
Title: Re: Golink goes wrong when linking Jwasm 64 bits file.
Post by: PauloH on May 22, 2010, 03:52:30 PM
Thanks for your answer, wjr.
This new attachment has the .obj and .res files you asked for.

Kind regards,

Paulo H. Duarte
Title: Re: Golink goes wrong when linking Jwasm 64 bits file.
Post by: wjr on May 24, 2010, 07:03:25 AM
The easier part - to answer your questions, you are not missing a switch and are not doing anything wrong. However, I tend to use the following order to build:

GoLink.exe DialogAsMain64.obj DialogAsMain64.res kernel32.dll user32.dll

The not so easy part would now be up to Jeremy. Although the JWasm obj IMAGE_RELOCATION and SYMBOL_TABLE look fine, something still has thrown GoLink off with the call offsets to the IAT. The partial calculation would appear to omit an offset taking into account the size of the Jump Table and IMPORT Descriptors, and a 2 is used which looks like it should multiply a 4 giving instead multiples of 8 to point into the IMPORT Address Table...
Title: Re: Golink goes wrong when linking Jwasm 64 bits file.
Post by: PauloH on June 04, 2010, 06:02:23 PM
Hi,
I found the following: using the jWasm includes, leads to the error I've described in my first post. Now, I made a new project and this one doesn't use the jWasm includes and the compilation goes ok.
If anyone has some interest, the attachment contains the project and a build.bat. Please, correct your paths in the build. bat as you want.

Thanks,

Paulo H.