News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

GoLink.exe: Wrong export address

Started by nsquare, September 11, 2009, 12:27:34 PM

Previous topic - Next topic

nsquare

Sorry that I look like too good a de-bugger, but there is another problem with GoLink.exe.

Assemble and link the following code piece into a dll,


CODE SECTION

EXPORT func_nam FRAME arg1, arg2
LOCAL a:D
xor eax, eax
ret
ENDF


EXPORT func_nam_w FRAME arg1, arg2, arg3
LOCAL a:D
mov eax, ebx
xor eax, eax
ret
ENDF


and the result disassembles into


Exp Addr Hint   Ord Export Name by dllb.dll - Fri Sep 11 15:57:18 2009
-------- ---- ----- ---------------------------------------------------------
00001000    0     1 func_nam
00001000    1     2 func_nam_w


Disassembly

10001000                    func_nam:
10001000 55                     push    ebp
10001001 89E5                   mov     ebp,esp
10001003 83EC04                 sub     esp,4
10001006 31C0                   xor     eax,eax
10001008 89EC                   mov     esp,ebp
1000100A 5D                     pop     ebp
1000100B C20800                 ret     8

1000100E 55                     push    ebp
1000100F 89E5                   mov     ebp,esp
10001011 83EC04                 sub     esp,4
10001014 89D8                   mov     eax,ebx
10001016 31C0                   xor     eax,eax
10001018 89EC                   mov     esp,ebp
1000101A 5D                     pop     ebp
1000101B C20C00                 ret     0Ch
1000101E 0000                   add     [eax],al


The RVA of the second function is specified as 1000h, but the following disassembly
shows that it should be 100Eh.

jorgon

Hi nsquare

Thanks for reporting this error.
As you may have seen, this only happened in the case of exported labels and only when the first 8 characters of the named export were the same.

Now corrected in GoLink Version 0.26.14.

Author of the "Go" tools (GoAsm, GoLink, GoRC, GoBug)

nsquare