The MASM Forum Archive 2004 to 2012

Project Support Forums => GoAsm Assembler and Tools => Topic started by: kamulos on April 10, 2009, 02:26:07 AM

Title: exporting with ordinal
Post by: kamulos on April 10, 2009, 02:26:07 AM
two small questions

is it possible to export with ordinal in the asm file? I tried:
EXPORTS test:3
code

test:
jmp user32.dll:MessageBoxA


and it says
QuoteThe following exported symbol was not defined in the object file or files:-
test@3

also i'm wondering if it is possible to redirect imports... When i want to link object files from different sources some try to import "_MessageBoxA" others "_imp_MessageBoxA" etc and GoAsm uses the real name as symbol name... is there a way to manage this without much work? of course this is a way:
_MessageBoxA:
_imp_MessageBoxA:
jmp MessageBoxA

but there is a jump which consumes some cpu cycle so i dont really like it
Title: Re: exporting with ordinal
Post by: donkey on April 10, 2009, 03:20:23 AM
Hi, it is possible however since I have never used it and the examples in the manual seem to be broken I think Jeremy will have to handle this question. I tried this directly from the manual:

EXPORT:2:NONAME
CALCULATE:
xor eax,eax
ret

Error!
Ordinal number is needed for no-name export
CALCULATE@2
Error found in .drectve section
The following exported symbol was not defined in the object file or files:-
CALCULATE@2
Output file not made


There is obviously something I am missing in the syntax for exports by ordinal...

Edgar
Title: Re: exporting with ordinal
Post by: jorgon on April 10, 2009, 07:54:51 AM
Hi Kamulos

There was an exporting by ordinal problem in GoAsm, allied to another export bug, very recently fixed.
Would you mind using the GoAsm version attached to this thread?
http://www.masm32.com/board/index.php?topic=11189.0

As for linking files from different sources, I did recently add the "/mix" switch in the latest beta version of GoLink, which may assist with such problems.
Could I refer you to this thread?
If this does not solve your problem, please let me know.
http://www.masm32.com/board/index.php?topic=10813.0

Title: Re: exporting with ordinal
Post by: kamulos on April 10, 2009, 11:35:44 AM
wow thanks... ill have a look