News:

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

exporting with ordinal

Started by kamulos, April 10, 2009, 02:26:07 AM

Previous topic - Next topic

kamulos

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

donkey

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
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

jorgon

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

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

kamulos

wow thanks... ill have a look