!!! Debug Symbols !!! NLM 32bit-L,H,VL,VH example: nwshell.nlm -------------------- 0 1 2 3 4 5 6 7 8 9 A B C D E F 10111213 14151617 0000 - 4E657457 61726520 4C6F6164 61626C65 204D6F64 756C651A 0d db 'NetWare Loadable Module',1Ah 0018 - 04000000 24d NLM Type: bit2=NLM (always set), bit7=compressed 001C - 0B 'NWSHELL.NLM',00,00 28d [b-len] NLM_NAME.NLM (Asciiz) 002A - 3C01 0000 42d Code Addess 0 (in NLM) 002E - 08B6 0000 46d Code Length 0032 - 44B7 0000 50d Data Address (Usually CA+length of CA) 0036 - 3884 0000 54d Data Length 003A - 0000 0000 58d 003E - 4B69 0100 62d Address of CUSTOM Data File (usually after 'Autoload Modules' but not always) 0042 - 0000 0000 66d Custom Data File length 0046 - 4669 0100 70d Address of Autoload Modules 004A - 0100 0000 74d Number of Autoload Module entries (or[|]=1) 004E - 7C3B 0100 78d Relocation table 0052 - 7E06 0000 82d Relocation table entries in DWORD 0056 - 7455 0100 86d Import Item table address items: [b-len],ITEMNAME,[dw-len of following entries],entry1, entry2,... entries are DWORDs 005A - 8800 0000 90d Number of Import Item table entries 005E - 4669 0100 94d Export Item table address [b-len],PUBLIC_NAME,[dw address, highest bit:1=CODE, 0=DATA] 0062 - 0000 0000 98d Number of Export Item table entries 0066 - 4B69 0100 102d Debug table address 006A - 0000 0000 106d Debug table entries debug entry: [b-type 0=DATA,1=CODE],dw ADDRESS,[b-len],ENTRYNAME 006E - 0000 0000 110d Start Procedure address (relative to Code Address) 0072 - 6100 0000 114d Exit Procedure address (rel to CA) 0076 - 8004 0000 118d Check Unload Status Procedure address (rel to CA) 007A - 0000 0000 122d NLMType ----------------------------------------------------------------------- 0-NLM=Generic NLM (default value) 1-LAN=LAN driver 2-DSK=Disk driver 3-NAM=Name space support module 4-NLM=Utility or support program 5-MSL=Mirrored Server Link 6-NLM=OS NLM 7-NLM=Paged high OS NLM [SERVER.NLM in SERVER.EXE] 8-HAM=Host Adapter Module (works with Custom Device Module) 9-CDM=Custom Device Module (works with Host Adapter Module) A-NLM=OS Reserved B-NLM=OS Reserved C-NLM=OS Reserved [C=Internal Protected NLM (POLYMGR.NLM in SERVER.EXE)] D-PSM=Platform Support Module (from 4.11) 007E - 0200 0000 126d FLAG bits= 0 [1] - REENTRANT module 1 [2] - MULTIPLE (Can be load multiple times) 2 [4] - SYNCHRONIZE (load process go to sleep until the NLM calls SychronizeStart function) 3 [8] - PSEUDOPREEMPTION 4 [16] - OS_DOMAIN 5 [32] - 6 [64] - AUTOUNLOAD 7 [128] - 0082 - [b-len],NLM Description,[0] STACKSIZE dw 00400000 ???? dw 00000000 ' LONG'[b-len],ConsoleName,[0] [b-len],ThreadName,[0] 'VeRsIoN#' dword major,minor,rev,year,month,day 'CoPyRiGhT='[b-len],Copyright,[0] msgaddr 'MeSsAgEs'dw?,dw addr,dw len,dw #of msg entries HELPFILE dw addr,dw len XDCDATA (RPCD-Remote Procedure Call directory) dw addr, dw len SHARED Library dw addr,dw len, (?dw a,l,a,l,a,l,a,l,a,l) <-global CODE, DATA msgaddr+7Ch CuStHeAd [dw len],dw addr of STAMPEDDATA,dw len,"STAMP 8" [msgaddr+90h] CyGnUsEx (first at Webserver BASIC.NLM) ;usually after end of NLM [3E] there is MESSAGES which is noted in MeSsAgEs ;at the first entry, after that there is RPCD ;examples: TCPIP.NLM, NWSNUT.NLM ;there is NLM where only RPCD entry exist (Message zero-filled) header main() customdatafile This directive allows the developer to specify a custom data file for the use of the NLM. stampeddata This directive causes NLMLINK to create a custom data structure in which the dataName is given by stamp and adds the contents of the datafile to the NLM. For compatibility with earlier versions of NLMLINK, both the stamp and the datafile are required. However, the datafile can have zero length. messages This directive specifies the file path to an internationalized message file that contains the default messages for the NLM. help The help file path specifies the path to an internationalized help file that contains the default help screens for the NLM. shared lib This directive specifies the path to an NLM to be loaded as a shared NLM. Shared NLM applications (for example, math libraries) contain global code and global data that are mapped into all memory protection domains. This method of loading exported functions can be used to avoid ring transitions when calling exported functions in other domains rpcd This directive specifies a path to a file containing Remote Procedure Call (RPC) descriptions for functions in the NLM. RPC descriptions for functions make it possible for functions to be exported across memory protection domain boundaries. The RPC compiler, which produces this file, has not yet been released. For more information about memory protection, see the "Memory Protection" chapter of NetWare Architecture. If NLM is compressed: 0190 - 010A 400d Compression version (1.10) 0192 - dword 402d Length of expanded NLM