On Sun, Mar 1, 2015 at 10:22 PM, Keith Medcalf <kmedcalf at dessus.com> wrote:

> >I do not know if this is the case, but typically Windows creates names
> >like
> >_sqlite3_db_filename at X (where X is a number) if a function is defined as
> >stdcall. It doesn't *have* to do this, but that's the convention used by
>
> the <symbol>@X is used to include the ordinal reference (@X) in the symbol
> since you can link by either name or ordinal (or, in the case of specially
> constructed libraries, by both having to match).  This is not, however, the
> "normal" case.  The normal case is to export symbols only and link the
> modules at load time by name.  This syntax is used specifically so that
> when you add a new entry ordinal to a dll, it does not get inserted into
> the name table in default order, but rather that symbols keep their
> previous version ordinals so that intra-version trampolines contained in
> link libraries will continue to work between different versions of the load
> library.
>

It's the size of the data pushed onto the stack by the caller and is used
by the callee to clean up the stack. Not unlike the pascal calling
convention. See
https://en.wikipedia.org/wiki/X86_calling_conventions#stdcall ... In any
case, the @X doesn't *need* to be part of the symbol (the Windows API entry
points don't use it, even though they use stdcall as I understand it) as
the cleanup code isn't dependent on the symbol. It's just a convention.

-- 
Scott Robison

Reply via email to