Description: This record provides the name and initialization parmameters of a DLL that will demangle the compiler generated mangled names. The linker will use this DLL when displaying error messages.
     The Subrecord Format is:

          1      1         <-Name Length-> 1         <-Parms Length->
         ÚÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
         ³ 0xAF ³ Name    ³ DLL Name      ³ Parms   ³ Demangle Init  ³
         ³      ³ Length  ³               ³ Length  ³ Parameters     ³
         ÀÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

IDMDLL Identifier Manipulator DLL subrecord format definition

The Name Length byte gives the number of characters in the DLL Name; the DLL Name itself is ASCII.

The DLL Name is the name of the Identifier Manipulator Dynamic Link Library provided by the language. This DLL is used to demangle an internal identifier when that identifier will be displayed in an error message.

The Parms Length byte gives the number of characters in the Demangle Init Parameters; the Demangle Init Parameters itself is ASCII.

The Demangle Init Parameters provides information (to the DLL) on how internal identifiers are mangled.

The linker will not scan forward for an IDMDLL record when an identifier will be displayed. This record should occur near the beginning of the file.

IDMDLL class COMENT records are processed during pass 1 of the linker.
Notes:

Because object oriented compilers allow for two functions to have the same name but different parameters, the compiler uniquely identifies each function by changing the name of the function. This is known as mangling. An example of this would be:

             User Prototype                 Compiler Generated
                                            Mangled Name
             --------------------------     ------------------
             void doit( int, float )        _doit__Fif
             void doit( const char * )      _doit__FCPc

The user will usually not be aware that the compiler changed the name, so it is neccessary for the linker to demangle the compiler generated name when printing out linker error messages.

The dynamic link library (DLL) provided by an object oriented language compiler must contain two 16-bit functions which employ the pascal calling convention:

INITDEMANGLEID

DEMANGLEID

The INITDEMANGLEID and DEMANGLEID entry points may be called more than once.

All functions must return true (non-zero) if the call is successful and false (zero) if the call fails. In this manner the linker can ignore whatever is returned in the second parameter of the DEMANGLEID fuction if the function returns false. When calling DEMANGLEID, the linker will pass in the address of a buffer for the second parameter, and the size of the buffer for the third parameter.

All string parameters must be length-prefixed ASCII strings except for pszPrototype, parameter 2 for DEMANGLEID (because the length might not fit in a byte). Function prototypes for these routines look like:

  unsigned short pascal far INITDEMANGLEID(char far * psInitParms);
  unsigned short pascal far DEMANGLEID(char far * psMangledName,
                                       char far * pszPrototype,
                                       unsigned long BufferLen);

Note: Languages may also wish to provide 32-bit functions for use by 32-bit linkers, when they become available. Function prototypes look like:

  unsigned long _system InitDemangleID32(char * psInitParms);

  unsigned long _system DemangleID32(char * psMangledName,
                                     char * pszPrototype,
                                     unsigned long BufferLen);


[Back: 88H WKEXT Weak Extern Record (comment class A8)]
[Next: 8BH MODEND Module End Record]