To make the symbols externally accessible, it is possible to give nicknames to mangled names, or to
change the mangled name directly. Two modifiers can be used:
-
cdecl:
- A function that has a cdecl modifier, will be used with C calling conventions, that
is, the caller clears the stack. Also the mangled name will be the name exactly as it is
declared. cdecl is part of the function declaration, and hence must be present both in
the interface and implementation section of a unit.
-
alias:
- The alias modifier can be used to assign a second assembler label to your function.
This label has the same name as the alias name you declared. This doesn’t modify the
calling conventions of the function. In other words, the alias modifier allows you to
specify another name (a nickname) for your function or procedure.
The prototype for an aliased function or procedure is as follows:
Procedure AliasedProc; alias : 'AliasName';
|
The procedure AliasedProc will also be known as AliasName. Take care, the name you
specify is case sensitive (as C is).
Furthermore, the exports section of a library is also used to declare the names that will be
exported by the shared library. The names in the exports section are case-sensitive (while the
actual declaration of the routine is not). For more information on the creating shared libraries,
chapter 11, page 436.