Re: Export from .asm without .def

Curt Hagenlocher <[email protected]>
Newsgroups gmane.comp.windows.off-topic
Message-ID <[email protected]>
Ooh, thanks for the link!

Marking the proc as public only makes it visible to the linker. It doesn't
actually define an export.

I may be insane, but I think I've got a pretty solid design rationale.
There's a certain product with an extensibility model that requires you to
define your entry points as exports from a DLL. This isn't very flexible for
interesting runtime code generation scenarios.

To work around it, I figure I'll define an arbitrary number of exports in my
own extension, each of which is just an indirect jump to a stored delegate.
I need to use .asm because I won't know in advance what the stack
configuration looks like for any given entry point. The use of "FOR" in a
macro mean that the .asm portion is actually quite small, though it turns
out that I may have to generate the .def file programmatically.

All-in-all, this seems much more straightforward than figuring out how to
write PE files.

On Sun, Feb 7, 2010 at 9:17 PM, Marc Brooks <[email protected]> wrote:

>
>
> Are you?
>
> A) Insane?
>
> B) Exporting methods (in which case, use PUBLIC) like:
> ASMPROC PROC PUBLIC USES eax ebx ecx edx esi edi ebp
>
>  LOCAL dummy:DWORD
>
>  ret
> ASMPROC ENDP
> C) Exporting datatables (in which case, you can generate the .DEF file at
> the same time)
>
> D) Really a glutton, in which case you might want to ask around at
> http://www.asmcommunity.net/board/index.php<http://www.asmcommunity.net/board/index.php?>
>
> Marc
>
> On Sun, Feb 7, 2010 at 11:28, Curt Hagenlocher <[email protected]>wrote:
>
>>
>>
>> It's 2010 and I'm, um, writing some assembler.
>>
>> Does anyone know if there's a way to export a module symbol directly from
>> the .asm file without using the .def? Something like what
>> "__declspec(dllexport)" does for C? Command-line options don't count because
>> I intend to export 1000 symbols.
>>
>> Thanks,
>> -Curt
>>
>>
>>
>
>
> --
> Marc C. Brooks
> http://musingmarc.blogspot.com
>
> NOT sent from an iPhone
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.