home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / watc11up.zip / core_hlp_os2.zip / binp / help / lguide.inf (.txt) < prev    next >
OS/2 Help File  |  2001-08-28  |  244KB  |  8,954 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. The Watcom Linker ΓòÉΓòÉΓòÉ
  3.  
  4.  
  5. The Watcom Linker is a linkage editor (linker) that takes object and library 
  6. files as input and produces executable files as output.  The following object 
  7. module and library formats are supported by the Watcom Linker. 
  8.  
  9.      The standard Intel Object Module Format (OMF). 
  10.      Microsoft's extensions to the standard Intel OMF. 
  11.      Phar Lap's Easy OMF-386 object module format for linking 386 
  12.       applications. 
  13.      The COFF object module format. 
  14.      The ELF object module format. 
  15.      The OMF library format. 
  16.      The AR (Microsoft compatible) object library format. 
  17.  
  18.  The Watcom Linker is capable of producing a number of executable file formats. 
  19.  The following lists these executable file formats. 
  20.  
  21.      DOS executable files 
  22.      ELF executable files 
  23.      executable files that run under FlashTek's DOS extender 
  24.      executable files that run under Phar Lap's 386|DOS-Extender 
  25.      executable files that run under Tenberry Software's DOS/4G and DOS/4GW 
  26.       DOS extenders 
  27.      executable files that run under Autodesk's AutoCAD Development System 
  28.      NetWare Loadable Modules (NLMs) that run under Novell's NetWare 386 
  29.       operating system 
  30.      OS/2 executable files including Dynamic Link Libraries 
  31.      QNX executable files 
  32.      16-bit Windows (Win16) executable files including Dynamic Link Libraries 
  33.      32-bit Windows (Win32) executable files including Dynamic Link Libraries 
  34.  
  35.  In addition to being able to generate the above executable file formats, the 
  36.  Watcom Linker also runs under a variety of operating systems.  Currently, the 
  37.  Watcom Linker runs under the following operating systems. 
  38.  
  39.      DOS 
  40.      OS/2 
  41.      QNX 
  42.      Windows NT 
  43.      Windows 95 
  44.  
  45.  We refer to the operating system upon which you run the Watcom Linker as the 
  46.  "host". 
  47.  
  48.  The chapter entitled Linking Executable Files for Various Systems summarizes 
  49.  each of the executable file formats that can be generated by the linker.  The 
  50.  chapter entitled Linker Directives and Options describes all of the linker 
  51.  directives and options.  The remaining chapters describe aspects of each of 
  52.  the executable file formats. 
  53.  
  54.  
  55. ΓòÉΓòÉΓòÉ 2. Linking Executable Files for Various Systems ΓòÉΓòÉΓòÉ
  56.  
  57.  
  58. The Watcom Linker command line format is as follows. 
  59.  
  60.  
  61.    wlink {directive} 
  62.  
  63. where directive is a series of Watcom Linker directives specified on the 
  64. command line or in one or more files.  If the directives are contained within a 
  65. file, the "@" character is used to reference that file.  If no file extension 
  66. is specified, a file extension of "lnk" is assumed. 
  67.  
  68. Example: 
  69.  
  70.    wlink name testprog @first @second option map 
  71.  
  72. In the above example, directives are specified on the command line (e.g., "name 
  73. testprog" and "option map") and in files (e.g., FIRST.LNK and SECOND.LNK). 
  74.  
  75.  
  76. ΓòÉΓòÉΓòÉ 2.1. Using the SYSTEM Directive ΓòÉΓòÉΓòÉ
  77.  
  78.  
  79. For each executable file format that can be created using the Watcom Linker, a 
  80. specific SYSTEM directive may be used.  The SYSTEM directive selects a subset 
  81. of the available directives necessary to create each specific executable file 
  82. format. 
  83.  
  84.  System 
  85.       Description 
  86.  
  87.  com 
  88.       16-bit x86 DOS ".COM" executable 
  89.  
  90.  dos 
  91.       16-bit x86 DOS executable 
  92.  
  93.  dos4g 
  94.       32-bit x86 DOS/4GW executable 
  95.  
  96.  dos4gnz 
  97.       non-zero based 32-bit x86 DOS/4GW executable 
  98.  
  99.  netware 
  100.       32-bit x86 NetWare Loadable Module 
  101.  
  102.  novell 
  103.       synonym for "netware" 
  104.  
  105.  os2 
  106.       16-bit x86 OS/2 executable 
  107.  
  108.  os2 dll 
  109.       16-bit x86 OS/2 Dynamic Link Library 
  110.  
  111.  os2v2 
  112.       32-bit x86 OS/2 executable 
  113.  
  114.  os2v2 dll 
  115.       32-bit x86 OS/2 Dynamic Link Library 
  116.  
  117.  os2v2_pm 
  118.       32-bit x86 OS/2 Presentation Manager executable 
  119.  
  120.  pharlap 
  121.       32-bit x86 Phar Lap executable 
  122.  
  123.  tnt 
  124.       32-bit x86 Phar Lap TNT executable 
  125.  
  126.  qnx 
  127.       16-bit x86 QNX executable 
  128.  
  129.  qnx386 
  130.       32-bit x86 QNX executable 
  131.  
  132.  x32r 
  133.       32-bit x86 FlashTek executable using register-based calling conventions 
  134.  
  135.  x32rv 
  136.       32-bit x86 virtual-memory FlashTek executable using register-based 
  137.       calling conventions 
  138.  
  139.  x32s 
  140.       32-bit x86 FlashTek executable using stack-based calling conventions 
  141.  
  142.  x32sv 
  143.       32-bit x86 virtual-memory FlashTek executable using stack-based calling 
  144.       conventions 
  145.  
  146.  windows 
  147.       16-bit x86 Windows 3.x executable 
  148.  
  149.  windows_dll 
  150.       16-bit x86 Windows 3.x Dynamic Link Library 
  151.  
  152.  win95 
  153.       32-bit x86 Windows 95 executable 
  154.  
  155.  win95 dll 
  156.       32-bit x86 Windows 95 Dynamic Link Library 
  157.  
  158.  nt 
  159.       32-bit x86 Windows NT character-mode executable 
  160.  
  161.  nt_win 
  162.       32-bit x86 Windows NT windowed executable 
  163.  
  164.  win32 
  165.       synonym for "nt_win" 
  166.  
  167.  nt_dll 
  168.       32-bit x86 Windows NT Dynamic Link Library 
  169.  
  170.  win386 
  171.       32-bit x86 Watcom extended Windows 3.x executable or Dynamic Link Library 
  172.  
  173.  ads 
  174.       32-bit x86 AutoCAD Development System executable 
  175.  
  176.  eadi 
  177.       32-bit x86 Emulation AutoCAD Device Interface 
  178.  
  179.  fadi 
  180.       32-bit x86 Floating-point AutoCAD Device Interface 
  181.  
  182.  The various systems that we have listed above are defined in special linker 
  183.  directive files which are plain ASCII text files that you can edit.  These 
  184.  files are called WLINK.LNK and WLSYSTEM.LNK. 
  185.  
  186.  The file WLINK.LNK is a special linker directive file that is automatically 
  187.  processed by the Watcom Linker before processing any other directives.  On a 
  188.  DOS, OS/2, or Windows-hosted system, this file must be located in one of the 
  189.  paths specified in the PATH environment variable.  On a QNX-hosted system, 
  190.  this file should be located in the /etc directory.  A default version of this 
  191.  file is located in the \WATCOM\BINW directory on DOS-hosted systems, the 
  192.  \WATCOM\BINP directory on OS/2-hosted systems, the /etc directory on 
  193.  QNX-hosted systems, and the \WATCOM\BINNT directory on Windows 95 or Windows 
  194.  NT-hosted systems.  Note that the file WLINK.LNK includes the file 
  195.  WLSYSTEM.LNK which is located in the \WATCOM\BINW directory on DOS, OS/2, or 
  196.  Windows-hosted systems and the /etc directory on QNX-hosted systems. 
  197.  
  198.  The files WLINK.LNK and WLSYSTEM.LNK reference the WATCOM environment variable 
  199.  which must be set to the directory in which you installed your software. 
  200.  
  201.  In the following sections, we show some of the typical directives that you 
  202.  might use to create a particular executable file format.  The common 
  203.  directives are described in the chapter entitled Linker Directives and 
  204.  Options.  They are "common" in the sense that they may be used with any 
  205.  executable format.  There are other, less general, directives that may be 
  206.  specified for a particular executable format.  In each of the following 
  207.  sections, we refer you to chapters in which you will find more information on 
  208.  the directives available with the executable format used. 
  209.  
  210.  At this point, it should be noted that various systems have adopted particular 
  211.  executable file formats.  For example, AutoCAD applications use a Phar Lap 
  212.  executable file format and both the Tenberry Software DOS/4G(W) and FlashTek 
  213.  DOS extenders support one of the OS/2 executable file formats.  It is for this 
  214.  reason that you may find that we direct you to a chapter which would, at first 
  215.  glance, seem unrelated to the executable file format in which you are 
  216.  interested. 
  217.  
  218.  To summarize, the steps that you should follow to learn about creating a 
  219.  particular executable are: 
  220.  
  221.    1. Look for a section in this chapter that describes the executable format 
  222.       in which you are interested. 
  223.  
  224.    2. See the chapter entitled Linker Directives and Options for a description 
  225.       of the common directives. 
  226.  
  227.    3. If you require additional information, see also the chapter to which we 
  228.       have referred you. 
  229.  
  230.    4. Also check the Watcom C/C++ Programmer's Guide or Watcom FORTRAN 77 
  231.       Programmer's Guide for more information on creating specific types of 
  232.       applications. 
  233.  
  234.  
  235. ΓòÉΓòÉΓòÉ 2.2. Linking 16-bit x86 Executable Files ΓòÉΓòÉΓòÉ
  236.  
  237.  
  238. The following sections describe how to link a variety of 16-bit executable 
  239. files. 
  240.  
  241.  
  242. ΓòÉΓòÉΓòÉ 2.2.1. Linking 16-bit x86 DOS Executable Files ΓòÉΓòÉΓòÉ
  243.  
  244.  
  245. To create this type of file, use the following structure. 
  246.  
  247.  
  248.    system  dos 
  249.    option  map 
  250.    name   app_name 
  251.    file   obj1, obj2, ... 
  252.    library  lib1, lib2, ... 
  253.  
  254. For more information, see the chapter entitled DOS:  The DOS Executable File 
  255. Format. 
  256.  
  257.  
  258. ΓòÉΓòÉΓòÉ 2.2.2. Linking 16-bit x86 DOS .COM Executable Files ΓòÉΓòÉΓòÉ
  259.  
  260.  
  261. To create this type of file, use the following structure. 
  262.  
  263.  
  264.    system  com 
  265.    option  map 
  266.    name   app_name 
  267.    file   obj1, obj2, ... 
  268.    library  lib1, lib2, ... 
  269.  
  270. For more information, see the chapter entitled DOS:  The DOS Executable File 
  271. Format. 
  272.  
  273.  
  274. ΓòÉΓòÉΓòÉ 2.2.3. Linking 16-bit x86 OS/2 Executable Files ΓòÉΓòÉΓòÉ
  275.  
  276.  
  277. To create this type of file, use the following structure. 
  278.  
  279.  
  280.    system  os2 
  281.    option  map 
  282.    name   app_name 
  283.    file   obj1, obj2, ... 
  284.    library  lib1, lib2, ... 
  285.  
  286. For more information, see the chapter entitled OS/2:  The OS/2 Executable and 
  287. DLL File Formats. 
  288.  
  289.  
  290. ΓòÉΓòÉΓòÉ 2.2.4. Linking 16-bit x86 OS/2 Dynamic Link Libraries ΓòÉΓòÉΓòÉ
  291.  
  292.  
  293. To create this type of file, use the following structure. 
  294.  
  295.  
  296.    system  os2 dll 
  297.    option  map 
  298.    name   app_name 
  299.    file   obj1, obj2, ... 
  300.    library  lib1, lib2, ... 
  301.  
  302. For more information, see the chapter entitled OS/2:  The OS/2 Executable and 
  303. DLL File Formats. 
  304.  
  305.  
  306. ΓòÉΓòÉΓòÉ 2.2.5. Linking 16-bit x86 QNX Executable Files ΓòÉΓòÉΓòÉ
  307.  
  308.  
  309. To create this type of file, use the following structure. 
  310.  
  311.  
  312.    system  qnx 
  313.    option  map 
  314.    name   app_name 
  315.    file   obj1, obj2, ... 
  316.    library  lib1, lib2, ... 
  317.  
  318. For more information, see the chapter entitled QNX:  The QNX Executable File 
  319. Format. 
  320.  
  321.  
  322. ΓòÉΓòÉΓòÉ 2.2.6. Linking 16-bit x86 Windows 3.x Executable Files ΓòÉΓòÉΓòÉ
  323.  
  324.  
  325. To create this type of file, use the following structure. 
  326.  
  327.  
  328.    system  windows 
  329.    option  map 
  330.    name   app_name 
  331.    file   obj1, obj2, ... 
  332.    library  lib1, lib2, ... 
  333.  
  334. For more information, see the chapter entitled Win16:  The Win16 Executable and 
  335. DLL File Formats. 
  336.  
  337.  
  338. ΓòÉΓòÉΓòÉ 2.2.7. Linking 16-bit x86 Windows 3.x Dynamic Link Libraries ΓòÉΓòÉΓòÉ
  339.  
  340.  
  341. To create this type of file, use the following structure. 
  342.  
  343.  
  344.    system  windows_dll 
  345.    option  map 
  346.    name   app_name 
  347.    file   obj1, obj2, ... 
  348.    library  lib1, lib2, ... 
  349.  
  350. For more information, see the chapter entitled Win16:  The Win16 Executable and 
  351. DLL File Formats. 
  352.  
  353.  
  354. ΓòÉΓòÉΓòÉ 2.3. Linking 32-bit x86 Executable Files ΓòÉΓòÉΓòÉ
  355.  
  356.  
  357. The following sections describe how to create a variety of 32-bit executable 
  358. files. 
  359.  
  360.  
  361. ΓòÉΓòÉΓòÉ 2.3.1. Linking 32-bit x86 AutoCAD Development System Executable Files ΓòÉΓòÉΓòÉ
  362.  
  363.  
  364. To create this type of file, use the following structure. 
  365.  
  366.  
  367.    system  ads 
  368.    option  map 
  369.    name   app_name 
  370.    file   obj1, obj2, ... 
  371.    library  lib1, lib2, ... 
  372.  
  373. For more information, see the chapter entitled Phar Lap:  The Phar Lap 
  374. Executable File Format. 
  375.  
  376.  
  377. ΓòÉΓòÉΓòÉ 2.3.2. Linking 32-bit x86 AutoCAD Device Interface Executable Files ΓòÉΓòÉΓòÉ
  378.  
  379.  
  380. To create this type of file, use the following structure for an emulation 
  381. AutoCAD Device Interface. 
  382.  
  383.  
  384.    system  eadi 
  385.    option  map 
  386.    name   app_name 
  387.    file   obj1, obj2, ... 
  388.    library  lib1, lib2, ... 
  389.  
  390. To create a floating-point AutoCAD Device Interface, specify 
  391.  
  392.  
  393.    system  fadi. 
  394.  
  395. For more information, see the chapter entitled Phar Lap:  The Phar Lap 
  396. Executable File Format. 
  397.  
  398.  
  399. ΓòÉΓòÉΓòÉ 2.3.3. Linking 32-bit x86 DOS/4GW Executable Files ΓòÉΓòÉΓòÉ
  400.  
  401.  
  402. To create this type of file, use the following structure. 
  403.  
  404.  
  405.    system  dos4g 
  406.    option  map 
  407.    name   app_name 
  408.    file   obj1, obj2, ... 
  409.    library  lib1, lib2, ... 
  410.  
  411. For more information, see the chapter entitled OS/2:  The OS/2 Executable and 
  412. DLL File Formats. 
  413.  
  414.  
  415. ΓòÉΓòÉΓòÉ 2.3.4. Linking 32-bit x86 FlashTek Executable Files ΓòÉΓòÉΓòÉ
  416.  
  417.  
  418. To create these files, use one of the following structures. 
  419.  
  420.  
  421.    system  x32r 
  422.    option  map 
  423.    name   app_name 
  424.    file   obj1, obj2, ... 
  425.    library  lib1, lib2, ... 
  426.  
  427. If the system is x32r, a FlashTek executable file is created for an application 
  428. using the register calling convention. 
  429.  
  430.  
  431.    system  x32rv 
  432.    option  map 
  433.    name   app_name 
  434.    file   obj1, obj2, ... 
  435.    library  lib1, lib2, ... 
  436.  
  437. If the system is x32rv, a virtual-memory FlashTek executable file is created 
  438. for an application using the register calling convention. 
  439.  
  440.  
  441.    system  x32s 
  442.    option  map 
  443.    name   app_name 
  444.    file   obj1, obj2, ... 
  445.    library  lib1, lib2, ... 
  446.  
  447. If the system is x32s, a FlashTek executable file is created for an application 
  448. using the stack calling convention. 
  449.  
  450.  
  451.    system  x32sv 
  452.    option  map 
  453.    name   app_name 
  454.    file   obj1, obj2, ... 
  455.    library  lib1, lib2, ... 
  456.  
  457. If the system is x32sv, a virtual-memory FlashTek executable file is created 
  458. for an application using the stack calling convention. 
  459.  
  460. For more information, see the chapter entitled OS/2:  The OS/2 Executable and 
  461. DLL File Formats. 
  462.  
  463.  
  464. ΓòÉΓòÉΓòÉ 2.3.5. Linking 32-bit x86 Novell NetWare Loadable Modules ΓòÉΓòÉΓòÉ
  465.  
  466.  
  467. To create this type of file, use the following structure. 
  468.  
  469.  
  470.    system  netware 
  471.    option  map 
  472.    name   app_name 
  473.    file   obj1, obj2, ... 
  474.    library  lib1, lib2, ... 
  475.    module  mod_name 
  476.    import  @%WATCOM%\novi\mod_name.imp 
  477.  
  478. For more information, see the chapter entitled NetWare:  The NetWare 386 
  479. Executable File Format. 
  480.  
  481.  
  482. ΓòÉΓòÉΓòÉ 2.3.6. Linking 32-bit x86 OS/2 Executable Files ΓòÉΓòÉΓòÉ
  483.  
  484.  
  485. To create this type of file, use the following structure. 
  486.  
  487.  
  488.    system  os2v2 
  489.    option  map 
  490.    name   app_name 
  491.    file   obj1, obj2, ... 
  492.    library  lib1, lib2, ... 
  493.  
  494. For more information, see the chapter entitled OS/2:  The OS/2 Executable and 
  495. DLL File Formats. 
  496.  
  497.  
  498. ΓòÉΓòÉΓòÉ 2.3.7. Linking 32-bit x86 OS/2 Dynamic Link Libraries ΓòÉΓòÉΓòÉ
  499.  
  500.  
  501. To create this type of file, use the following structure. 
  502.  
  503.  
  504.    system  os2v2 dll 
  505.    option  map 
  506.    name   app_name 
  507.    file   obj1, obj2, ... 
  508.    library  lib1, lib2, ... 
  509.  
  510. For more information, see the chapter entitled OS/2:  The OS/2 Executable and 
  511. DLL File Formats. 
  512.  
  513.  
  514. ΓòÉΓòÉΓòÉ 2.3.8. Linking 32-bit x86 OS/2 Presentation Manager Executable Files ΓòÉΓòÉΓòÉ
  515.  
  516.  
  517. To create this type of file, use the following structure. 
  518.  
  519.  
  520.    system  os2v2_pm 
  521.    option  map 
  522.    name   app_name 
  523.    file   obj1, obj2, ... 
  524.    library  lib1, lib2, ... 
  525.  
  526. For more information, see the chapter entitled OS/2:  The OS/2 Executable and 
  527. DLL File Formats. 
  528.  
  529.  
  530. ΓòÉΓòÉΓòÉ 2.3.9. Linking 32-bit x86 Phar Lap Executable Files ΓòÉΓòÉΓòÉ
  531.  
  532.  
  533. To create this type of file, use the following structure. 
  534.  
  535.  
  536.    system  pharlap 
  537.    option  map 
  538.    name   app_name 
  539.    file   obj1, obj2, ... 
  540.    library  lib1, lib2, ... 
  541.  
  542. For more information, see the chapter entitled Phar Lap:  The Phar Lap 
  543. Executable File Format. 
  544.  
  545.  
  546. ΓòÉΓòÉΓòÉ 2.3.10. Linking 32-bit x86 Phar Lap TNT Executable Files ΓòÉΓòÉΓòÉ
  547.  
  548.  
  549. To create this type of file, use the following structure. 
  550.  
  551.  
  552.    system  tnt 
  553.    option  map 
  554.    name   app_name 
  555.    file   obj1, obj2, ... 
  556.    library  lib1, lib2, ... 
  557.  
  558. For more information, see the chapter entitled Win32:  The Win32 Executable and 
  559. DLL File Formats. 
  560.  
  561.  
  562. ΓòÉΓòÉΓòÉ 2.3.11. Linking 32-bit x86 QNX Executable Files ΓòÉΓòÉΓòÉ
  563.  
  564.  
  565. To create this type of file, use the following structure. 
  566.  
  567.  
  568.    system  qnx386 
  569.    option  map 
  570.    name   app_name 
  571.    file   obj1, obj2, ... 
  572.    library  lib1, lib2, ... 
  573.  
  574. For more information, see the chapter entitled QNX:  The QNX Executable File 
  575. Format. 
  576.  
  577.  
  578. ΓòÉΓòÉΓòÉ 2.3.12. Linking 32-bit x86 Extended Windows 3.x Executable ΓòÉΓòÉΓòÉ
  579.  
  580.  
  581. To create this type of file, use the following structure. 
  582.  
  583.  
  584.    system  win386 
  585.    option  map 
  586.    name   app_name 
  587.    file   obj1, obj2, ... 
  588.    library  lib1, lib2, ... 
  589.  
  590. After linking this executable, you must bind the Watcom 32-bit Windows-extender 
  591. to the executable (a .REX file) to produce a Windows executable (a .EXE file). 
  592.  
  593.  
  594.    wbind -n app_name 
  595.  
  596. For more information, see the chapter entitled Win16:  The Win16 Executable and 
  597. DLL File Formats. 
  598.  
  599.  
  600. ΓòÉΓòÉΓòÉ 2.3.13. Linking 32-bit x86 Extended Windows 3.x Dynamic Link Libraries ΓòÉΓòÉΓòÉ
  601.  
  602.  
  603. To create this type of file, use the following structure. 
  604.  
  605.  
  606.    system  win386 
  607.    option  map 
  608.    name   app_name 
  609.    file   obj1, obj2, ... 
  610.    library  lib1, lib2, ... 
  611.  
  612. After linking this executable, you must bind the Watcom 32-bit Windows-extender 
  613. for DLLs to the executable (a .REX file) to produce a Windows Dynamic Link 
  614. Library (a .DLL file). 
  615.  
  616.  
  617.    wbind -n -d app_name 
  618.  
  619. For more information, see the chapter entitled Win16:  The Win16 Executable and 
  620. DLL File Formats. 
  621.  
  622.  
  623. ΓòÉΓòÉΓòÉ 2.3.14. Linking 32-bit x86 Windows 95 Executable Files ΓòÉΓòÉΓòÉ
  624.  
  625.  
  626. To create this type of file, use the following structure. 
  627.  
  628.  
  629.    system  win95 
  630.    option  map 
  631.    name   app_name 
  632.    file   obj1, obj2, ... 
  633.    library  lib1, lib2, ... 
  634.  
  635. For more information, see the chapter entitled Win32:  The Win32 Executable and 
  636. DLL File Formats. 
  637.  
  638.  
  639. ΓòÉΓòÉΓòÉ 2.3.15. Linking 32-bit x86 Windows 95 Dynamic Link Libraries ΓòÉΓòÉΓòÉ
  640.  
  641.  
  642. To create this type of file, use the following structure. 
  643.  
  644.  
  645.    system  win95 dll 
  646.    option  map 
  647.    name   app_name 
  648.    file   obj1, obj2, ... 
  649.    library  lib1, lib2, ... 
  650.  
  651. For more information, see the chapter entitled Win32:  The Win32 Executable and 
  652. DLL File Formats. 
  653.  
  654.  
  655. ΓòÉΓòÉΓòÉ 2.3.16. Linking 32-bit x86 Windows NT Character-Mode Executable Files ΓòÉΓòÉΓòÉ
  656.  
  657.  
  658. To create this type of file, use the following structure. 
  659.  
  660.  
  661.    system  nt 
  662.    option  map 
  663.    name   app_name 
  664.    file   obj1, obj2, ... 
  665.    library  lib1, lib2, ... 
  666.  
  667. For more information, see the chapter entitled Win32:  The Win32 Executable and 
  668. DLL File Formats. 
  669.  
  670.  
  671. ΓòÉΓòÉΓòÉ 2.3.17. Linking 32-bit x86 Windows NT Windowed Executable Files ΓòÉΓòÉΓòÉ
  672.  
  673.  
  674. To create this type of file, use the following structure. 
  675.  
  676.  
  677.    system  nt_win 
  678.    option  map 
  679.    name   app_name 
  680.    file   obj1, obj2, ... 
  681.    library  lib1, lib2, ... 
  682.  
  683. For more information, see the chapter entitled Win32:  The Win32 Executable and 
  684. DLL File Formats. 
  685.  
  686.  
  687. ΓòÉΓòÉΓòÉ 2.3.18. Linking 32-bit x86 Windows NT Dynamic Link Libraries ΓòÉΓòÉΓòÉ
  688.  
  689.  
  690. To create this type of file, use the following structure. 
  691.  
  692.  
  693.    system  nt_dll 
  694.    option  map 
  695.    name   app_name 
  696.    file   obj1, obj2, ... 
  697.    library  lib1, lib2, ... 
  698.  
  699. For more information, see the chapter entitled Win32:  The Win32 Executable and 
  700. DLL File Formats. 
  701.  
  702.  
  703. ΓòÉΓòÉΓòÉ 3. Linker Directives and Options ΓòÉΓòÉΓòÉ
  704.  
  705.  
  706. The Watcom Linker supports a large set of directives and options.  The 
  707. following sections present these directives and options in alphabetical order. 
  708. Not all directives and options are supported for all executable formats.  When 
  709. a directive or option applies only to a subset of the executable formats that 
  710. the linker can generate, the supporting formats are noted.  In the following 
  711. example, the notation indicates that the directive or option is supported for 
  712. all executable formats. 
  713.  
  714. Example: 
  715.  
  716.    Formats: All 
  717.  
  718. In the following example, the notation indicates that the directive or option 
  719. is supported for OS/2, 16-bit Windows and 32-bit Windows executable formats 
  720. only. 
  721.  
  722. Example: 
  723.  
  724.    Formats: OS/2, Win16, Win32 
  725.  
  726. Directives tell the Watcom Linker how to create your program.  For example, 
  727. using directives you can tell the Watcom Linker which object files are to be 
  728. included in the program, which library files to search to resolve undefined 
  729. references, and the name of the executable file. 
  730.  
  731. The file WLINK.LNK is a special linker directive file that is automatically 
  732. processed by the Watcom Linker before processing any other directives.  On a 
  733. DOS, OS/2, or Windows-hosted system, this file must be located in one of the 
  734. paths specified in the PATH environment variable.  On a QNX-hosted system, this 
  735. file should be located in the /etc directory.  A default version of this file 
  736. is located in the \WATCOM\BINW directory on DOS-hosted systems, the 
  737. \WATCOM\BINP directory on OS/2-hosted systems, the /etc directory on QNX-hosted 
  738. systems, and the \WATCOM\BINNT directory on Windows 95 or Windows NT-hosted 
  739. systems.  Note that the file WLINK.LNK includes the file WLSYSTEM.LNK which is 
  740. located in the \WATCOM\BINW directory on DOS, OS/2, or Windows-hosted systems 
  741. and the /etc directory on QNX-hosted systems. 
  742.  
  743. The files WLINK.LNK and WLSYSTEM.LNK reference the WATCOM environment variable 
  744. which must be set to the directory in which you installed your software. 
  745.  
  746. It is also possible to use environment variables when specifying a directive. 
  747. For example, if the LIBDIR environment variable is defined as follows, 
  748.  
  749.  
  750.    set libdir=\test 
  751.  
  752. then the linker directive 
  753.  
  754.  
  755.    library %libdir%\mylib 
  756.  
  757. is equivalent to the following linker directive. 
  758.  
  759.  
  760.    library \test\mylib 
  761.  
  762. Note that a space must precede a reference to an environment variable. 
  763.  
  764. Many directives can take a list of one or more arguments separated by commas. 
  765. Instead of a comma-delimited list, you can specify a space-separated list 
  766. provided the list is enclosed in braces (e.g., { space delimited list }).  For 
  767. example, the "FILE" directive can take a list of object file names as an 
  768. argument. 
  769.  
  770.  
  771.    file first,second,third,fourth 
  772.  
  773. The alternate way of specifying this is as follows. 
  774.  
  775.  
  776.    file {first second third fourth} 
  777.  
  778. Where this comes in handy is in make files, where a list of dependents is 
  779. usually a space-delimited list. 
  780.  
  781.  
  782.    OBJS = first second third fourth 
  783.      . 
  784.      . 
  785.      . 
  786.      wlink file {$(objs)} 
  787.  
  788. The following notation is used to describe the syntax of linker directives and 
  789. options. 
  790.  
  791.  ABC 
  792.       All items in upper case are required. 
  793.  
  794.  [abc] 
  795.       The item abc is optional. 
  796.  
  797.  {abc} 
  798.       The item abc may be repeated zero or more times. 
  799.  
  800.  {abc}+ 
  801.       The item abc may be repeated one or more times. 
  802.  
  803.  a|b|c 
  804.       One of a, b or c may be specified. 
  805.  
  806.  a ::= b 
  807.       The item a is defined in terms of b. 
  808.  
  809.  Certain characters have special meaning to the linker.  When a special 
  810.  character must appear in a name, you can imbed the string that makes up the 
  811.  name inside apostrophes (e.g., 'name@8').  This prevents the linker from 
  812.  interpreting the special character in its usual manner.  This is also true for 
  813.  file or path names that contain spaces (e.g., '\program 
  814.  files\software\mylib').  Normally, the linker would interpret a space or blank 
  815.  in a file name as a separator.  The special characters are listed below: 
  816.  
  817.  
  818.     +-----------+-----------------------+ 
  819.     | Character | Name of Character   | 
  820.     +-----------+-----------------------+ 
  821.     |      | Blank         | 
  822.     | =     | Equals         | 
  823.     | (     | Left Parenthesis    | 
  824.     | )     | Right Parenthesis   | 
  825.     | ,     | Comma         | 
  826.     | .     | Period         | 
  827.     | {     | Left Brace       | 
  828.     | }     | Right Brace      | 
  829.     | @     | At Sign        | 
  830.     | #     | Hash Mark       | 
  831.     | %     | Percentage Symbol   | 
  832.     +-----------+-----------------------+ 
  833.  
  834.  
  835. ΓòÉΓòÉΓòÉ 3.1. The ALIAS Directive ΓòÉΓòÉΓòÉ
  836.  
  837.  
  838. Formats:  All 
  839.  
  840. The "ALIAS" directive is used to specify an equivalent name for a symbol name. 
  841. The format of the "ALIAS" directive (short form "A") is as follows. 
  842.  
  843.  
  844.      ALIAS alias_name=symbol_name{, alias_name=symbol_name} 
  845.  
  846.  where 
  847.       description 
  848.  
  849.  alias_name 
  850.       is the alias name. 
  851.  
  852.  symbol_name 
  853.       is the symbol name to which the alias name is mapped. 
  854.  
  855.  Consider the following example. 
  856.  
  857.  
  858.     alias sine=mysine 
  859.  
  860.  When the linker tries to resolve the reference to sine, it will immediately 
  861.  substitute the name mysine for sine and begin searching for the symbol mysine. 
  862.  
  863.  
  864. ΓòÉΓòÉΓòÉ 3.2. The ALIGNMENT Option ΓòÉΓòÉΓòÉ
  865.  
  866.  
  867. Formats:  ELF, OS/2, Win16, Win32 
  868.  
  869. The "ALIGNMENT" option specifies the alignment for segments in the executable 
  870. file.  The format of the "ALIGNMENT" option (short form "A") is as follows. 
  871.  
  872.  
  873.      OPTION ALIGNMENT=n 
  874.  
  875.  where 
  876.       description 
  877.  
  878.  n 
  879.       represents a value.  The complete form of n is the following. 
  880.  
  881.  
  882.          [0x]d{d}[k|m] 
  883.  
  884.       d represents a decimal digit.  If 0x is specified, the string of digits 
  885.       represents a hexadecimal number.  If k is specified, the value is 
  886.       multiplied by 1024.  If m is specified, the value is multiplied by 
  887.       1024*1024. 
  888.  
  889.  n specifies the alignment for segments in the executable file and must be a 
  890.  power of 2. 
  891.  
  892.  In 16-bit applications, segments in the executable file are pointed to by a 
  893.  segment table.  An entry in the segment table contains a 16-bit value which is 
  894.  a multiple of the alignment value.  Together they form the offset of the 
  895.  segment from the start of the segment table.  Note that the smaller the value 
  896.  of n the smaller the executable file. 
  897.  
  898.  By default, the Watcom Linker will automatically choose the smallest value of 
  899.  n possible.  You need not specify this option unless you want padding between 
  900.  segments in the executable file. 
  901.  
  902.  
  903. ΓòÉΓòÉΓòÉ 3.3. The ANONYMOUSEXPORT Directive ΓòÉΓòÉΓòÉ
  904.  
  905.  
  906. Formats:  Win16, Win32 
  907.  
  908. The "ANONYMOUSEXPORT" directive is an alternative to the "EXPORT" directive 
  909. described in The EXPORT Directive.  The symbol associated with this name will 
  910. not appear in either the resident or the non-resident names table.  The entry 
  911. point is, however, still available for ordinal linking. 
  912.  
  913. The format of the "ANONYMOUSEXPORT" directive (short form "ANON") is as 
  914. follows. 
  915.  
  916.  
  917.      ANONYMOUSEXPORT export{,export} 
  918.        or 
  919.      ANONYMOUSEXPORT =lbc_file 
  920.  
  921.      export ::= entry_name[.ordinal][=internal_name] 
  922.  
  923.  where 
  924.       description 
  925.  
  926.  entry_name 
  927.       is the name to be used by other applications to call the function. 
  928.  
  929.  ordinal 
  930.       is an ordinal value for the function.  If the ordinal number is 
  931.       specified, other applications can reference the function by using this 
  932.       ordinal number. 
  933.  
  934.  internal_name 
  935.       is the actual name of the function and should only be specified if it 
  936.       differs from the entry name. 
  937.  
  938.  lbc_file 
  939.       is a file specification for the name of a librarian command file.  If no 
  940.       file extension is specified, a file extension of "lbc" is assumed.  The 
  941.       linker will process the librarian command file and look for commands to 
  942.       the librarian that are used to create import library entries.  These 
  943.       commands have the following form. 
  944.  
  945.  
  946.          ++sym.dll_name[.[altsym].export_name][.ordinal] 
  947.  
  948.       where 
  949.                 description 
  950.  
  951.       sym 
  952.                 is the name of a symbol in a Dynamic Link Library. 
  953.  
  954.       dll_name 
  955.                 is the name of the Dynamic Link Library that defines sym. 
  956.  
  957.       altsym 
  958.                 is the name of a symbol in a Dynamic Link Library.  When 
  959.                 omitted, the default symbol name is sym. 
  960.  
  961.       export_name 
  962.                 is the name that an application that is linking to the Dynamic 
  963.                 Link Library uses to reference sym.  When omitted, the default 
  964.                 export name is sym. 
  965.  
  966.       ordinal 
  967.                 is the ordinal value that can be used to identify sym instead 
  968.                 of using the name export_name. 
  969.       All other librarian commands will be ignored. 
  970.  
  971.  Notes: 
  972.  
  973.    1. By default, the Watcom C and C++ compilers append an underscore ('_') to 
  974.       all function names.  This should be considered when specifying entry_name 
  975.       and internal_name in an "ANONYMOUSEXPORT" directive. 
  976.  
  977.    2. If the name contains characters that are special to the linker then the 
  978.       name may be placed inside apostrophes (e.g., anonymousexport 'myfunc@8'). 
  979.  
  980.    3. The symbol associated with the entry name will not appear in either the 
  981.       resident or the non-resident names table.  The entry point is, however, 
  982.       still available for ordinal linking.  This directive is important when 
  983.       you wish to reduce the number of entries that are placed in the resident 
  984.       and non-resident names table. 
  985.  
  986.  
  987. ΓòÉΓòÉΓòÉ 3.4. The ARTIFICIAL Option ΓòÉΓòÉΓòÉ
  988.  
  989.  
  990. Formats:  All 
  991.  
  992. The "ARTIFICIAL" option should only be used if you are developing a Watcom C++ 
  993. application.  A Watcom C++ application contains many compiler-generated 
  994. symbols.  By default, the linker does not include these symbols in the map 
  995. file.  The "ARTIFICIAL" option can be used if you wish to include these 
  996. compiler-generated symbols in the map file. 
  997.  
  998. The format of the "ARTIFICIAL" option (short form "ART") is as follows. 
  999.  
  1000.  
  1001.      OPTION ARTIFICIAL 
  1002.  
  1003.  
  1004. ΓòÉΓòÉΓòÉ 3.5. The CACHE Option ΓòÉΓòÉΓòÉ
  1005.  
  1006.  
  1007. Formats:  All 
  1008.  
  1009. The "CACHE" and "NOCACHE" options can be used to control caching of object and 
  1010. library files in memory by the linker.  When neither the "CACHE" nor "NOCACHE" 
  1011. option is specified, the linker will only cache small libraries.  Object files 
  1012. and large libraries are not cached.  The "CACHE" and "NOCACHE" options can be 
  1013. used to alter this default behaviour.  The "CACHE" option enables the caching 
  1014. of object files and large library files while the "NOCACHE" option disables all 
  1015. caching. 
  1016.  
  1017. The format of the "CACHE" option (short form "CAC") is as follows. 
  1018.  
  1019.  
  1020.      OPTION CACHE 
  1021.  
  1022. The format of the "NOCACHE" option (short form "NOCAC") is as follows. 
  1023.  
  1024.  
  1025.      OPTION NOCACHE 
  1026.  
  1027. When linking large applications with many object files, caching object files 
  1028. will cause extensive use of memory by the linker.  On virtual memory systems 
  1029. such as OS/2, Windows NT or Windows 95, this can cause extensive page file 
  1030. activity when real memory resources have been exhausted.  This can degrade the 
  1031. performance of other tasks on your system.  For this reason, the OS/2 and 
  1032. Windows-hosted versions of the linker do not perform object file caching by 
  1033. default. This does not imply that object file caching is not beneficial.  If 
  1034. your system has lots of real memory or the linker is running as the only task 
  1035. on the machine, object file caching can certainly improve the performance of 
  1036. the linker. 
  1037.  
  1038. On single-tasking environments such as DOS, the benefits of improved linker 
  1039. performance outweighs the memory demands associated with object file caching. 
  1040. For this reason, object file caching is performed by default on these systems. 
  1041. If the memory requirements of the linker exceed the amount of memory on your 
  1042. system, the "NOCACHE" option can be specified. 
  1043.  
  1044. The QNX operating system is a multi-tasking real-time operating system. 
  1045. However, it is not a virtual memory system.  Caching object files can consume 
  1046. large amounts of memory.  This may prevent other tasks on the system from 
  1047. running, a problem that may be solved by using the "NOCACHE" option. 
  1048.  
  1049.  
  1050. ΓòÉΓòÉΓòÉ 3.6. The CASEEXACT Option ΓòÉΓòÉΓòÉ
  1051.  
  1052.  
  1053. Formats:  All 
  1054.  
  1055. The "CASEEXACT" option tells the Watcom Linker to respect case when resolving 
  1056. references to global symbols. That is, "ScanName" and "SCANNAME" represent two 
  1057. different symbols.  By default, the linker is case insensitive; "ScanName" and 
  1058. "SCANNAME" represent the same symbol.  The format of the "CASEEXACT" option 
  1059. (short form "C") is as follows. 
  1060.  
  1061.  
  1062.      OPTION CASEEXACT 
  1063.  
  1064. If you have specified the "CASEEXACT" option in the default directive files 
  1065. WLINK.LNK or WLSYSTEM.LNK, it is possible to override this option by using the 
  1066. "NOCASEEXACT" option.  The "NOCASEEXACT" option turns off case-sensitive 
  1067. linking.  The format of the "NOCASEEXACT" option (short form "NOCASE") is as 
  1068. follows. 
  1069.  
  1070.  
  1071.      OPTION NOCASEEXACT 
  1072.  
  1073. The file WLINK.LNK is a special linker directive file that is automatically 
  1074. processed by the Watcom Linker before processing any other directives.  On a 
  1075. DOS, OS/2, or Windows-hosted system, this file must be located in one of the 
  1076. paths specified in the PATH environment variable.  On a QNX-hosted system, this 
  1077. file should be located in the /etc directory.  A default version of this file 
  1078. is located in the \WATCOM\BINW directory on DOS-hosted systems, the 
  1079. \WATCOM\BINP directory on OS/2-hosted systems, the /etc directory on QNX-hosted 
  1080. systems, and the \WATCOM\BINNT directory on Windows 95 or Windows NT-hosted 
  1081. systems.  Note that the file WLINK.LNK includes the file WLSYSTEM.LNK which is 
  1082. located in the \WATCOM\BINW directory on DOS, OS/2, or Windows-hosted systems 
  1083. and the /etc directory on QNX-hosted systems. 
  1084.  
  1085. The files WLINK.LNK and WLSYSTEM.LNK reference the WATCOM environment variable 
  1086. which must be set to the directory in which you installed your software. 
  1087.  
  1088.  
  1089. ΓòÉΓòÉΓòÉ 3.7. The CHECK Option ΓòÉΓòÉΓòÉ
  1090.  
  1091.  
  1092. Formats:  NetWare 
  1093.  
  1094. The "CHECK" option specifies the name of a procedure to execute before an NLM 
  1095. is unloaded.  This procedure can, for example, inform the operator that the NLM 
  1096. is in use and prevent it from being unloaded. 
  1097.  
  1098. The format of the "CHECK" option (short form "CH") is as follows. 
  1099.  
  1100.  
  1101.      OPTION CHECK=symbol_name 
  1102.  
  1103.  where 
  1104.       description 
  1105.  
  1106.  symbol_name 
  1107.       specifies the name of a procedure to execute before the NLM is unloaded. 
  1108.  
  1109.  If the "CHECK" option is not specified, no check procedure will be called. 
  1110.  
  1111.  
  1112. ΓòÉΓòÉΓòÉ 3.8. The # Directive ΓòÉΓòÉΓòÉ
  1113.  
  1114.  
  1115. Formats:  All 
  1116.  
  1117. The "#" directive is used to mark the start of a comment.  All text from the 
  1118. "#" character to the end of the line is considered a comment.  The format of 
  1119. the "#" directive is as follows. 
  1120.  
  1121.  
  1122.      # comment 
  1123.  
  1124.  where 
  1125.       description 
  1126.  
  1127.  comment 
  1128.       is any sequence of characters. 
  1129.  
  1130.  The following directive file illustrates the use of comments. 
  1131.  
  1132.  
  1133.     file main, trigtest 
  1134.  
  1135.     # Use my own version of "sin" instead of the 
  1136.     # library version. 
  1137.  
  1138.     file mysin 
  1139.     library \math\trig 
  1140.  
  1141.  
  1142. ΓòÉΓòÉΓòÉ 3.9. The COMMIT Directive ΓòÉΓòÉΓòÉ
  1143.  
  1144.  
  1145. Formats:  Win32 
  1146.  
  1147. When the operating system allocates the stack and heap for an application, it 
  1148. does not actually allocate the whole stack and heap to the application when it 
  1149. is initially loaded.  Instead, only a portion of the stack and heap are 
  1150. allocated or committed to the application.  Any part of the stack and heap that 
  1151. is not committed will be committed on demand. 
  1152.  
  1153. The format of the "COMMIT" directive (short form "COM") is as follows. 
  1154.  
  1155.  
  1156.      COMMIT mem_type 
  1157.  
  1158.      mem_type ::= STACK=n | HEAP=n 
  1159.  
  1160.  where 
  1161.       description 
  1162.  
  1163.  n 
  1164.       represents a value.  The complete form of n is the following. 
  1165.  
  1166.  
  1167.          [0x]d{d}[k|m] 
  1168.  
  1169.       d represents a decimal digit.  If 0x is specified, the string of digits 
  1170.       represents a hexadecimal number.  If k is specified, the value is 
  1171.       multiplied by 1024.  If m is specified, the value is multiplied by 
  1172.       1024*1024. 
  1173.  
  1174.       n represents the amout of stack or heap that is initially committed to 
  1175.       the application.  The short form for "STACK" is "ST" and the short form 
  1176.       for "HEAP" is "H". 
  1177.  
  1178.  If you do not specify the "COMMIT HEAP" directive then a 4k heap is committed 
  1179.  to the application. 
  1180.  
  1181.  If you do not specify the "COMMIT STACK" directive then the default size is 
  1182.  the smaller of 64K or the size specified by the "STACK" option.  See the 
  1183.  section entitled The STACK Option for more information on specifying a stack 
  1184.  size. 
  1185.  
  1186.  
  1187. ΓòÉΓòÉΓòÉ 3.10. The COPYRIGHT Option ΓòÉΓòÉΓòÉ
  1188.  
  1189.  
  1190. Formats:  NetWare 
  1191.  
  1192. The "COPYRIGHT" option specifies copyright information that is placed in the 
  1193. executable file.  The format of the "COPYRIGHT" option (short form "COPYR") is 
  1194. as follows. 
  1195.  
  1196.  
  1197.      OPTION COPYRIGHT 'string' 
  1198.  
  1199.  where 
  1200.       description 
  1201.  
  1202.  string 
  1203.       specifies the copyright information. 
  1204.  
  1205.  
  1206. ΓòÉΓòÉΓòÉ 3.11. The CUSTOM Option ΓòÉΓòÉΓòÉ
  1207.  
  1208.  
  1209. Formats:  NetWare 
  1210.  
  1211. The format of the "CUSTOM" option (short form "CUST") is as follows. 
  1212.  
  1213.  
  1214.      OPTION CUSTOM=file_name 
  1215.  
  1216.  where 
  1217.       description 
  1218.  
  1219.  file_name 
  1220.       specifies the file name of the custom data file. 
  1221.  
  1222.  The custom data file is placed into the executable file when the application 
  1223.  is linked but is really not part of the program.  When the application is 
  1224.  loaded into memory, the information extracted from a custom data file is not 
  1225.  loaded into memory.  Instead, information is passed to the program (as 
  1226.  arguments) which allows the access and processing of this information. 
  1227.  
  1228.  
  1229. ΓòÉΓòÉΓòÉ 3.12. The CVPACK Option ΓòÉΓòÉΓòÉ
  1230.  
  1231.  
  1232. Formats:  All 
  1233.  
  1234. This option is only meaningful when generating Microsoft Codeview debugging 
  1235. information.  This option causes the linker to automatically run the Watcom 
  1236. Codeview 4 Symbolic Debugging Information Compactor, CVPACK, on the executable 
  1237. that it has created.  This is necessary to get the Codeview debugging 
  1238. information into a state where the Microsoft Codeview debugger will accept it. 
  1239.  
  1240. The format of the "CVPACK" option (short form "CVP") is as follows. 
  1241.  
  1242.  
  1243.      OPTION CVPACK 
  1244.  
  1245. For more information on generating Codeview debugging information into the 
  1246. executable, see the section entitled The DEBUG Directive 
  1247.  
  1248.  
  1249. ΓòÉΓòÉΓòÉ 3.13. The DEBUG Directive ΓòÉΓòÉΓòÉ
  1250.  
  1251.  
  1252. Formats:  All 
  1253.  
  1254. The "DEBUG" directive is used to tell the Watcom Linker to generate debugging 
  1255. information in the executable file.  This extra information in the executable 
  1256. file is used by the Watcom Debugger.  The format of the "DEBUG" directive 
  1257. (short form "D") is as follows. 
  1258.  
  1259.  
  1260.      DEBUG dbtype [dblist] | 
  1261.      DEBUG [dblist] 
  1262.  
  1263.      db_type ::= DWARF | WATCOM | CODEVIEW | NOVELL 
  1264.      db_list ::= [db_option{,db_option}] 
  1265.      db_option ::= LINES | TYPES | LOCALS | ALL 
  1266.  
  1267.    DEBUG NOVELL only 
  1268.      db_option ::= ONLYEXPORTS | REFERENCED 
  1269.  
  1270. The Watcom Linker supports four types of debugging information, "DWARF" (the 
  1271. default), "WATCOM", "CODEVIEW", or "NOVELL". 
  1272.  
  1273.  DWARF 
  1274.       (short form "D") specifies that all object files contain Dwarf format 
  1275.       debugging information and that the executable file will contain Dwarf 
  1276.       debugging information. 
  1277.  
  1278.       This debugging format is assumed by default when none is specified. 
  1279.  
  1280.  WATCOM 
  1281.       (short form "W") specifies that all object files contain WATCOM format 
  1282.       debugging information and that the executable file will contain WATCOM 
  1283.       debugging information.  This format permits the selection of specific 
  1284.       classes of debugging information ( db_list) which are described below. 
  1285.  
  1286.  CODEVIEW 
  1287.       (short form "C") specifies that all object files contain Codeview (CV4) 
  1288.       format debugging information and that the executable file will contain 
  1289.       Codeview debugging information. 
  1290.  
  1291.       It will be necessary to run the Microsoft Debugging Information 
  1292.       Compactor, CVPACK, on the executable that it has created.  For 
  1293.       information on requesting the linker to automatically run CVPACK, see the 
  1294.       section entitled The CVPACK Option Alternatively, you can run CVPACK from 
  1295.       the command line. 
  1296.  
  1297.  NOVELL 
  1298.       (short form "N") specifies a form of global symbol information that can 
  1299.       only be processed by the NetWare 386 debugger. 
  1300.  
  1301.  For the WATCOM debugging information format, we can be selective about the 
  1302.  types of debugging information that we include with the executable file.  We 
  1303.  can categorize the types of debugging information as follows: 
  1304.  
  1305.      global symbol information 
  1306.      line numbering information 
  1307.      local symbol information 
  1308.      typing information 
  1309.      NetWare 386 global symbol information 
  1310.  
  1311.  The following options can be used with the "DEBUG WATCOM" directive to control 
  1312.  which of the above classes of debugging information is included in the 
  1313.  executable file. 
  1314.  
  1315.  LINES 
  1316.       (short form "LI") specifies line numbering and global symbol information. 
  1317.  
  1318.  LOCALS 
  1319.       (short form "LO") specifies local and global symbol information. 
  1320.  
  1321.  TYPES 
  1322.       (short form "T") specifies typing and global symbol information. 
  1323.  
  1324.  ALL 
  1325.       (short form "A") specifies all of the above debugging information. 
  1326.  
  1327.  ONLYEXPORTS 
  1328.       (short form "ONL") restricts the generation of global symbol information 
  1329.       to exported symbols.  This option may only be used with Netware 
  1330.       executable formats. 
  1331.  
  1332.  The following options can be used with the "DEBUG NOVELL" directive to control 
  1333.  which of the above classes of debugging information is included in the 
  1334.  executable file. 
  1335.  
  1336.  ONLYEXPORTS 
  1337.       (short form "ONL") restricts the generation of global symbol information 
  1338.       to exported symbols. 
  1339.  
  1340.  REFERENCED 
  1341.       (short form "REF") restricts the generation of symbol information to 
  1342.       referenced symbols only. 
  1343.  
  1344.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1345.  
  1346.   Note:  The position of the "DEBUG" directive is important.  The level of 
  1347.  debugging information specified in a "DEBUG" directive only applies to object 
  1348.  files and libraries that appear in subsequent "FILE" or "LIBRARY" directives. 
  1349.  For example, if "DEBUG WATCOM ALL" was the only "DEBUG" directive specified 
  1350.  and was also the last linker directive, no debugging information would appear 
  1351.  in the executable file. 
  1352.  
  1353.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1354.  
  1355.  Only global symbol information is actually produced by the Watcom Linker; the 
  1356.  other three classes of debugging information are extracted from object modules 
  1357.  and copied to the executable file.  Therefore, at compile time, you must 
  1358.  instruct the compiler to generate local symbol, line numbering and typing 
  1359.  information in the object file so that the information can be transferred to 
  1360.  the executable file.  If you have asked the Watcom Linker to produce a 
  1361.  particular class of debugging information and it appears that none is present, 
  1362.  one of the following conditions may exist. 
  1363.  
  1364.    1. The debugging information is not present in the object files. 
  1365.  
  1366.    2. The "DEBUG" directive has been misplaced. 
  1367.  
  1368.  The following sections describe the classes of debugging information. 
  1369.  
  1370.  
  1371. ΓòÉΓòÉΓòÉ 3.13.1. Line Numbering Information - DEBUG WATCOM LINES ΓòÉΓòÉΓòÉ
  1372.  
  1373.  
  1374. The "DEBUG WATCOM LINES" option controls the processing of line numbering 
  1375. information.  Line numbering information is the line number and address of the 
  1376. generated code for each line of source code in a particular module.  This 
  1377. allows Watcom Debugger to perform source-level debugging.  When the Watcom 
  1378. Linker encounters a "DEBUG WATCOM" directive with a "LINES" or "ALL" option, 
  1379. line number information for each subsequent object module will be placed in the 
  1380. executable file.  This includes all object modules extracted from object files 
  1381. specified in subsequent "FILE" directives and object modules extracted from 
  1382. libraries specified in subsequent "LIBRARY" or "FILE" directives. 
  1383.  
  1384. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1385.  
  1386.  Note:  All modules for which line numbering information is requested must have 
  1387. been compiled with the "d1" or "d2" option. 
  1388.  
  1389. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1390.  
  1391. A subsequent "DEBUG WATCOM" directive without a "LINES" or "ALL" option 
  1392. terminates the processing of line numbering information. 
  1393.  
  1394.  
  1395. ΓòÉΓòÉΓòÉ 3.13.2. Local Symbol Information - DEBUG WATCOM LOCALS ΓòÉΓòÉΓòÉ
  1396.  
  1397.  
  1398. The "DEBUG WATCOM LOCALS" option controls the processing of local symbol 
  1399. information.  Local symbol information is the name and address of all symbols 
  1400. local to a particular module.  This allows Watcom Debugger to locate these 
  1401. symbols so that you can reference local data and routines by name.  When the 
  1402. Watcom Linker encounters a "DEBUG WATCOM" directive with a "LOCALS" or "ALL" 
  1403. option, local symbol information for each subsequent object module will be 
  1404. placed in the executable file.  This includes all object modules extracted from 
  1405. object files specified in subsequent "FILE" directives and object modules 
  1406. extracted from libraries specified in subsequent "LIBRARY" or "FILE" 
  1407. directives. 
  1408.  
  1409. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1410.  
  1411.  Note:  All modules for which local symbol information is requested must have 
  1412. been compiled with the "d2" option. 
  1413.  
  1414. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1415.  
  1416. A subsequent "DEBUG WATCOM" directive without a "LOCALS" or "ALL" option 
  1417. terminates the processing of local symbol information. 
  1418.  
  1419.  
  1420. ΓòÉΓòÉΓòÉ 3.13.3. Typing Information - DEBUG WATCOM TYPES ΓòÉΓòÉΓòÉ
  1421.  
  1422.  
  1423. The "DEBUG WATCOM TYPES" option controls the processing of typing information. 
  1424. Typing information includes a description of all types, structures and arrays 
  1425. that are defined in a module.  This allows Watcom Debugger to display variables 
  1426. according to their type.  When the Watcom Linker encounters a "DEBUG WATCOM" 
  1427. directive with a "TYPES" or "ALL" option, typing information for each 
  1428. subsequent object module will be placed in the executable file.  This includes 
  1429. all object modules extracted from object files specified in subsequent "FILE" 
  1430. directives and object modules extracted from libraries specified in subsequent 
  1431. "LIBRARY" or "FILE" directives. 
  1432.  
  1433. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1434.  
  1435.  Note:  All modules for which typing information is requested must have been 
  1436. compiled with the "d2" option. 
  1437.  
  1438. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1439.  
  1440. A subsequent "DEBUG WATCOM" directive without a "TYPES" or "ALL" option 
  1441. terminates the processing of typing information. 
  1442.  
  1443.  
  1444. ΓòÉΓòÉΓòÉ 3.13.4. All Debugging Information - DEBUG WATCOM ALL ΓòÉΓòÉΓòÉ
  1445.  
  1446.  
  1447. The "DEBUG WATCOM ALL" option specifies that "LINES", "LOCALS", and "TYPES" 
  1448. options are requested.  The "LINES" option controls the processing of line 
  1449. numbering information.  The "LOCALS" option controls the processing of local 
  1450. symbol information.  The "TYPES" option controls the processing of typing 
  1451. information.  Each of these options is described in a previous section.  A 
  1452. subsequent "DEBUG WATCOM " directive without an "ALL" option discontinues those 
  1453. options which are not specified in the list of debug options. 
  1454.  
  1455.  
  1456. ΓòÉΓòÉΓòÉ 3.13.5. Global Symbol Information ΓòÉΓòÉΓòÉ
  1457.  
  1458.  
  1459. Global symbol information consists of all the global symbols in your program 
  1460. and their address.  This allows Watcom Debugger to locate these symbols so that 
  1461. you can reference global data and routines by name.  When the Watcom Linker 
  1462. encounters a "DEBUG" directive, global symbol information for all the global 
  1463. symbols appearing in your program is placed in the executable file. 
  1464.  
  1465.  
  1466. ΓòÉΓòÉΓòÉ 3.13.6. Global Symbols for the NetWare 386 Debugger - DEBUG NOVELL ΓòÉΓòÉΓòÉ
  1467.  
  1468.  
  1469. The NetWare 386 operating system has a built-in debugger that can be used to 
  1470. debug programs.  When "DEBUG NOVELL" is specified, the Watcom Linker will 
  1471. generate global symbol information that can be used by the NetWare 386 
  1472. debugger.  Note that any line numbering, local symbol, and typing information 
  1473. generated in the executable file will not be recognized by the NetWare 386 
  1474. debugger.  Also, WSTRIP cannot be used to remove this form of global symbol 
  1475. information from the executable file. 
  1476.  
  1477.  
  1478. ΓòÉΓòÉΓòÉ 3.13.7. The ONLYEXPORTS Debugging Option ΓòÉΓòÉΓòÉ
  1479.  
  1480.  
  1481. The "ONLYEXPORTS" option (short form "ONL") restricts the generation of global 
  1482. symbol information to exported symbols (symbols appearing in an "EXPORT" 
  1483. directive).  If "DEBUG WATCOM ONLYEXPORTS" is specified, Watcom Debugger global 
  1484. symbol information is generated only for exported symbols.  If "DEBUG NOVELL 
  1485. ONLYEXPORTS" is specified, NetWare 386 global symbol information is generated 
  1486. only for exported symbols. 
  1487.  
  1488.  
  1489. ΓòÉΓòÉΓòÉ 3.13.8. Using DEBUG Directives ΓòÉΓòÉΓòÉ
  1490.  
  1491.  
  1492. Consider the following directive file. 
  1493.  
  1494.  
  1495.    debug watcom all 
  1496.    file module1 
  1497.    debug watcom lines 
  1498.    file module2, module3 
  1499.    debug watcom 
  1500.    library mylib 
  1501.  
  1502. It specifies that the following debugging information is to be generated in the 
  1503. executable file. 
  1504.  
  1505.    1. global symbol information for your program 
  1506.  
  1507.    2. line numbering, typing and local symbol information for the following 
  1508.       object files: 
  1509.  
  1510.  
  1511.          module1.obj 
  1512.  
  1513.    3. line numbering information for the following object files: 
  1514.  
  1515.  
  1516.          module2.obj 
  1517.          module3.obj 
  1518.  
  1519.  Note that if the "DEBUG WATCOM" directive before the "LIBRARY" directive is 
  1520.  not specified, line numbering information for all object modules extracted 
  1521.  from the library "mylib.lib" would be generated in the executable file 
  1522.  provided the object modules extracted from the library have line numbering 
  1523.  information present. 
  1524.  
  1525.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1526.  
  1527.   Note:  A "DEBUG WATCOM" directive with no option suppresses the processing of 
  1528.  line numbering, local symbol and typing information for all subsequent object 
  1529.  modules. 
  1530.  
  1531.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1532.  
  1533.  Debugging information can use a significant amount of disk space.  As shown in 
  1534.  the above example, you can select only the class of debugging information you 
  1535.  want and for those modules you wish to debug.  In this way, the amount of 
  1536.  debugging information in the executable file is minimized and hence the amount 
  1537.  of disk space used by the executable file is kept to a minimum. 
  1538.  
  1539.  As you can see from the above example, the position of the "DEBUG WATCOM" 
  1540.  directive is important when describing the debugging information that is to 
  1541.  appear in the executable file. 
  1542.  
  1543.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1544.  
  1545.   Note:  If you want all classes of debugging information for all files to 
  1546.  appear in the executable file you must specify "DEBUG WATCOM ALL" before any 
  1547.  "FILE" and "LIBRARY" directives. 
  1548.  
  1549.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  1550.  
  1551.  
  1552. ΓòÉΓòÉΓòÉ 3.13.9. Removing Debugging Information from an Executable File ΓòÉΓòÉΓòÉ
  1553.  
  1554.  
  1555. A utility called WSTRIP has been provided which takes as input an executable 
  1556. file and removes the debugging information placed in the executable file by the 
  1557. Watcom Linker.  Note that global symbol information generated using "DEBUG 
  1558. NOVELL" cannot be removed by WSTRIP. 
  1559.  
  1560. For more information on this utility, see the chapter entitled "The Watcom 
  1561. Strip Utility" in the Watcom C/C++ Tools User's Guide or Watcom FORTRAN 77 
  1562. Tools User's Guide. 
  1563.  
  1564.  
  1565. ΓòÉΓòÉΓòÉ 3.14. The DESCRIPTION Option ΓòÉΓòÉΓòÉ
  1566.  
  1567.  
  1568. Formats:  OS/2, Win16, Win32 
  1569.  
  1570. The "DESCRIPTION" option inserts the specified text into the application or 
  1571. Dynamic Link Library.  This is useful if you wish to embed copyright 
  1572. information into an application or Dynamic Link Library.  The format of the 
  1573. "DESCRIPTION" option (short form "DE") is as follows. 
  1574.  
  1575.  
  1576.      OPTION DESCRIPTION 'string' 
  1577.  
  1578.  where 
  1579.       description 
  1580.  
  1581.  string 
  1582.       is the sequence of characters to be embedded into the application or 
  1583.       Dynamic Link Library. 
  1584.  
  1585.  
  1586. ΓòÉΓòÉΓòÉ 3.15. The DISABLE Directive ΓòÉΓòÉΓòÉ
  1587.  
  1588.  
  1589. Formats:  All 
  1590.  
  1591. The "DISABLE" directive is used to disable the display of linker messages. 
  1592.  
  1593. The Watcom Linker issues three classes of messages; fatal errors, errors and 
  1594. warnings.  Each message has a 4-digit number associated with it.  Fatal 
  1595. messages start with the digit 3, error messages start with the digit 2, and 
  1596. warning messages start with the digit 1.  It is possible for a message to be 
  1597. issued as a warning or an error. 
  1598.  
  1599. If a fatal error occurs, the linker will terminate immediately and no 
  1600. executable file will be generated. 
  1601.  
  1602. If an error occurs, the linker will continue to execute so that all possible 
  1603. errors are issued.  However, no executable file will be generated since these 
  1604. errors do not permit a proper executable file to be generated. 
  1605.  
  1606. If a warning occurs, the linker will continue to execute.  A warning message is 
  1607. usually informational and does not prevent the creation of a proper executable 
  1608. file.  However, all warnings should eventually be corrected. 
  1609.  
  1610. Note that the behaviour of the linker does not change when a message is 
  1611. disabled.  For example, if a message that normally terminates the linker is 
  1612. disabled, the linker will still terminate but the message describing the reason 
  1613. for the termination will not be displayed.  For this reason, you should only 
  1614. disable messages that are warnings. 
  1615.  
  1616. The linker will ignore the severity of the message number.  For example, some 
  1617. messages can be displayed as errors or warnings.  It is not possible to disable 
  1618. the message when it is issued as a warning and display the message when it is 
  1619. issued as an error.  In general, do not specify the severity of the message 
  1620. when specifying a message number. 
  1621.  
  1622. The format of the "DISABLE" directive (short form "DISA") is as follows. 
  1623.  
  1624.  
  1625.      DISABLE msg_num{, msg_num} 
  1626.  
  1627.  where 
  1628.       description 
  1629.  
  1630.  msg_num 
  1631.       is a message number.  See the chapter entitled Watcom Linker Diagnostic 
  1632.       Messages for a list of messages and their corresponding numbers. 
  1633.  
  1634.  The following "DISABLE" directive will disable message 28 (an undefined symbol 
  1635.  has been referenced). 
  1636.  
  1637.  
  1638.     disable 28 
  1639.  
  1640.  
  1641. ΓòÉΓòÉΓòÉ 3.16. The DOSSEG Option ΓòÉΓòÉΓòÉ
  1642.  
  1643.  
  1644. Formats:  All 
  1645.  
  1646. The "DOSSEG" option tells the Watcom Linker to order segments in a special way. 
  1647. The format of the "DOSSEG" option (short form "D") is as follows. 
  1648.  
  1649.  
  1650.      OPTION DOSSEG 
  1651.  
  1652. When the "DOSSEG" option is specified, segments will be ordered in the 
  1653. following way. 
  1654.  
  1655.    1. all segments not belonging to group "DGROUP" with class "CODE" 
  1656.  
  1657.    2. all other segments not belonging to group "DGROUP" 
  1658.  
  1659.    3. all segments belonging to group "DGROUP" with class "BEGDATA" 
  1660.  
  1661.    4. all segments belonging to group "DGROUP" not with class "BEGDATA", "BSS" 
  1662.       or "STACK" 
  1663.  
  1664.    5. all segments belonging to group "DGROUP" with class "BSS" 
  1665.  
  1666.    6. all segments belonging to group "DGROUP" with class "STACK" 
  1667.  
  1668.  A special segment belonging to class "BEGDATA" is defined when linking with 
  1669.  Watcom run-time libraries.  This segment is initialized with the hexadecimal 
  1670.  byte pattern "01" and is the first segment in group "DGROUP" so that storing 
  1671.  data at location 0 can be detected. 
  1672.  
  1673.  Segments belonging to class "BSS" contain uninitialized data.  Note that this 
  1674.  only includes uninitialized data in segments belonging to group "DGROUP". 
  1675.  Segments belonging to class "STACK" are used to define the size of the stack 
  1676.  used for your application.  Segments belonging to the classes "BSS" and 
  1677.  "STACK" are last in the segment ordering so that uninitialized data need not 
  1678.  take space in the executable file. 
  1679.  
  1680.  When using Watcom run-time libraries, it is not necessary to specify the 
  1681.  "DOSSEG" option.  One of the object files in the Watcom run-time libraries 
  1682.  contains a special record that specifies the "DOSSEG" option. 
  1683.  
  1684.  If no "DOSSEG" option is specified, segments are ordered in the order they are 
  1685.  encountered by the Watcom Linker. 
  1686.  
  1687.  When the "DOSSEG" option is specified, the Watcom Linker defines two special 
  1688.  variables.  _edata defines the start of the "BSS" class of segments and _end 
  1689.  defines the end of the "BSS" class of segments.  Your program must not 
  1690.  redefine these symbols. 
  1691.  
  1692.  
  1693. ΓòÉΓòÉΓòÉ 3.17. The ELIMINATE Option ΓòÉΓòÉΓòÉ
  1694.  
  1695.  
  1696. Formats:  All 
  1697.  
  1698. The "ELIMINATE" option can be used to enable dead code elimination.  Dead code 
  1699. elimination is a process the linker uses to remove unreferenced segments from 
  1700. the application.  The linker will only remove segments that contain code; 
  1701. unreferenced data segments will not be removed. 
  1702.  
  1703. The format of the "ELIMINATE" option (short form "EL") is as follows. 
  1704.  
  1705.  
  1706.      OPTION ELIMINATE 
  1707.  
  1708.  Linking C/C++ Applications 
  1709.       Typically, a module of C/C++ code contains a number of functions.  When 
  1710.       this module is compiled, all functions will be placed in the same code 
  1711.       segment.  The chances of each function in the module being unreferenced 
  1712.       are remote and the usefulness of the "ELIMINATE" option is greatly 
  1713.       reduced. 
  1714.  
  1715.       In order to maximize the effect of the "ELIMINATE" option, the "zm" 
  1716.       compiler option is available to tell the Watcom C/C++ compiler to place 
  1717.       each function in its own code segment.  This allows the linker to remove 
  1718.       unreferenced functions from modules that contain many functions. 
  1719.  
  1720.       Note, that if a function is referenced by data, as in a jump table, the 
  1721.       linker will not be able to eliminate the code for the function even if 
  1722.       the data that references it is unreferenced. 
  1723.  
  1724.  Linking FORTRAN 77 Applications 
  1725.       The Watcom FORTRAN 77 compiler always places each function and subroutine 
  1726.       in its own code segment, even if they are contained in the same module. 
  1727.       Therefore when linking with the "ELIMINATE" option the linker will be 
  1728.       able to eliminate code on a function/subroutine basis. 
  1729.  
  1730.  
  1731. ΓòÉΓòÉΓòÉ 3.18. The ENDLINK Directive ΓòÉΓòÉΓòÉ
  1732.  
  1733.  
  1734. Formats:  All 
  1735.  
  1736. The "ENDLINK" directive is used to indicate the end of a new set of linker 
  1737. commands that are to be processed after the current set of commands has been 
  1738. processed.  The format of the "ENDLINK" directive (short form "ENDL") is as 
  1739. follows. 
  1740.  
  1741.  
  1742.      ENDLINK 
  1743.  
  1744. The "STARTLINK" directive, described in The STARTLINK Directive, is used to 
  1745. indicate the start of the set of commands. 
  1746.  
  1747.  
  1748. ΓòÉΓòÉΓòÉ 3.19. The EXIT Option ΓòÉΓòÉΓòÉ
  1749.  
  1750.  
  1751. Formats:  NetWare 
  1752.  
  1753. The format of the "EXIT" option (short form "EX") is as follows. 
  1754.  
  1755.  
  1756.      OPTION EXIT=symbol_name 
  1757.  
  1758.  where 
  1759.       description 
  1760.  
  1761.  symbol_name 
  1762.       specifies the name of the procedure that is executed when an NLM is 
  1763.       unloaded. 
  1764.  
  1765.  The default name of the exit procedure is "_Stop". 
  1766.  
  1767.  Note that the exit procedure cannot prevent the NLM from being unloaded.  Once 
  1768.  the exit procedure has executed, the NLM will be unloaded.  The "CHECK" option 
  1769.  can be used to specify a check procedure that can prevent an NLM from being 
  1770.  unloaded. 
  1771.  
  1772.  
  1773. ΓòÉΓòÉΓòÉ 3.20. The EXPORT Directive ΓòÉΓòÉΓòÉ
  1774.  
  1775.  
  1776. Formats:  ELF, NetWare, OS/2, Win16, Win32 
  1777.  
  1778. The "EXPORT" directive is used to tell the Watcom Linker which symbols are 
  1779. available for import by other executables. 
  1780.  
  1781.  
  1782. ΓòÉΓòÉΓòÉ 3.20.1. EXPORT - OS/2, Win16, Win32 only ΓòÉΓòÉΓòÉ
  1783.  
  1784.  
  1785. The "EXPORT" directive can be used to define the names and attributes of 
  1786. functions in Dynamic Link Libraries that are to be exported.  An "EXPORT" 
  1787. definition must be specified for every Dynamic Link Library function that is to 
  1788. be made available externally. 
  1789.  
  1790.  Win16: 
  1791.       An "EXPORT" directive is also required for the "window function".  This 
  1792.       function must be defined by all programs and is called by Windows to 
  1793.       provide information to the program.  For example, the window function is 
  1794.       called when a window is created, destroyed or resized, when an item is 
  1795.       selected from a menu, or when a scroll bar is being clicked with a mouse. 
  1796.  
  1797.  The format of the "EXPORT" directive (short form "EXP") is as follows. 
  1798.  
  1799.  
  1800.       EXPORT export{,export} 
  1801.         or 
  1802.       EXPORT =lbc_file 
  1803.  
  1804.     OS/2 only: 
  1805.       export ::= entry_name[.ordinal][=internal_name] 
  1806.             [PRIVATE] [RESIDENT] [iopl_bytes] 
  1807.  
  1808.     Win16, Win32 only: 
  1809.       export ::= entry_name[.ordinal][=internal_name] 
  1810.             [PRIVATE] [RESIDENT] 
  1811.  
  1812.  where 
  1813.       description 
  1814.  
  1815.  entry_name 
  1816.       is the name to be used by other applications to call the function. 
  1817.  
  1818.  ordinal 
  1819.       is an ordinal value for the function.  If the ordinal number is 
  1820.       specified, other applications can reference the function by using this 
  1821.       ordinal number. 
  1822.  
  1823.  internal_name 
  1824.       is the actual name of the function and should only be specified if it 
  1825.       differs from the entry name. 
  1826.  
  1827.  PRIVATE 
  1828.       (no short form ) specifies that the function's entry name should be 
  1829.       included in the DLL's export table, but not included in any import 
  1830.       library that the linker generates. 
  1831.  
  1832.  RESIDENT 
  1833.       (short form "RES") specifies that the function's entry name should be 
  1834.       kept resident in memory (i.e., added to the resident names table). 
  1835.  
  1836.       By default, the entry name is always made memory resident if an ordinal 
  1837.       is not specified (i.e., it is implicitly RESIDENT).  For 16-bit Windows, 
  1838.       the limit on the size of the resident names table is 64K bytes.  Memory 
  1839.       resident entry names allow the operating system to resolve calls more 
  1840.       efficiently when the call is by entry name rather than by ordinal. 
  1841.  
  1842.       If an ordinal is specified and RESIDENT is not specified, the entry name 
  1843.       is added to the non-resident names table (i.e., it is implicitly 
  1844.       non-RESIDENT).  If both the ordinal and the RESIDENT keyword are 
  1845.       specified, the symbol is placed in the resident names table. 
  1846.  
  1847.       If you do not want an entry name to appear in either the resident or 
  1848.       non-resident names table, you can use the "ANONYMOUSEXPORT" directive 
  1849.       described in The ANONYMOUSEXPORT Directive. 
  1850.  
  1851.  iopl_bytes 
  1852.       (OS/2 only) is required for functions that execute with I/O privilege. 
  1853.       iopl_bytes specifies that total size of the function's arguments in 
  1854.       bytes.  When such a function is executed, the specified number of bytes 
  1855.       is copied from the caller's stack to the I/O-privileged function's stack. 
  1856.       The maximum number of bytes allowed is 63. 
  1857.  
  1858.  lbc_file 
  1859.       is a file specification for the name of a librarian command file.  If no 
  1860.       file extension is specified, a file extension of "lbc" is assumed.  The 
  1861.       linker will process the librarian command file and look for commands to 
  1862.       the librarian that are used to create import library entries.  These 
  1863.       commands have the following form. 
  1864.  
  1865.  
  1866.          ++sym.dll_name[.[altsym].export_name][.ordinal] 
  1867.  
  1868.       where 
  1869.                 description 
  1870.  
  1871.       sym 
  1872.                 is the name of a symbol in a Dynamic Link Library. 
  1873.  
  1874.       dll_name 
  1875.                 is the name of the Dynamic Link Library that defines sym. 
  1876.  
  1877.       altsym 
  1878.                 is the name of a symbol in a Dynamic Link Library.  When 
  1879.                 omitted, the default symbol name is sym. 
  1880.  
  1881.       export_name 
  1882.                 is the name that an application that is linking to the Dynamic 
  1883.                 Link Library uses to reference sym.  When omitted, the default 
  1884.                 export name is sym. 
  1885.  
  1886.       ordinal 
  1887.                 is the ordinal value that can be used to identify sym instead 
  1888.                 of using the name export_name. 
  1889.       All other librarian commands will be ignored. 
  1890.  
  1891.  Notes: 
  1892.  
  1893.    1. By default, the Watcom C and C++ compilers append an underscore ('_') to 
  1894.       all function names.  This should be considered when specifying entry_name 
  1895.       and internal_name in an "EXPORT" directive. 
  1896.  
  1897.    2. If the name contains characters that are special to the linker then the 
  1898.       name may be placed inside apostrophes (e.g., export 'myfunc@8'). 
  1899.  
  1900.    3. If the __export declspec modifier is used in the source code, it is the 
  1901.       equivalent of using the following linker directive: 
  1902.  
  1903.  
  1904.          EXPORT entry_name RESIDENT 
  1905.  
  1906.  
  1907. ΓòÉΓòÉΓòÉ 3.20.2. EXPORT - ELF only ΓòÉΓòÉΓòÉ
  1908.  
  1909.  
  1910. The "EXPORT" directive is used to tell the Watcom Linker which symbols are 
  1911. available for import by other executables.  The format of the "EXPORT" 
  1912. directive (short form "EXP") is as follows. 
  1913.  
  1914.  
  1915.      EXPORT entry_name{,entry_name} 
  1916.  
  1917.  where 
  1918.       description 
  1919.  
  1920.  entry_name 
  1921.       is the name of the exported symbol. 
  1922.  
  1923.  Notes: 
  1924.  
  1925.    1. By default, the Watcom C and C++ compilers append an underscore ('_') to 
  1926.       all function names.  This should be considered when specifying entry_name 
  1927.       in an "EXPORT" directive. 
  1928.  
  1929.    2. If the name contains characters that are special to the linker then the 
  1930.       name may be placed inside apostrophes (e.g., export 'myfunc@8'). 
  1931.  
  1932.  
  1933. ΓòÉΓòÉΓòÉ 3.20.3. EXPORT - Netware only ΓòÉΓòÉΓòÉ
  1934.  
  1935.  
  1936. The "EXPORT" directive is used to tell the Watcom Linker which symbols are 
  1937. available for import by other NLMs.  The format of the "EXPORT" directive 
  1938. (short form "EXP") is as follows. 
  1939.  
  1940.  
  1941.      EXPORT entry_name{,entry_name} 
  1942.  
  1943.  where 
  1944.       description 
  1945.  
  1946.  entry_name 
  1947.       is the name of the exported symbol. 
  1948.  
  1949.  Notes: 
  1950.  
  1951.    1. If the name contains characters that are special to the linker then the 
  1952.       name may be placed inside apostrophes (e.g., export 'myfunc@8'). 
  1953.  
  1954.  
  1955. ΓòÉΓòÉΓòÉ 3.21. The FILE Directive ΓòÉΓòÉΓòÉ
  1956.  
  1957.  
  1958. Formats:  All 
  1959.  
  1960. The "FILE" directive is used to specify the object files and library modules 
  1961. that the Watcom Linker is to process.  The format of the "FILE" directive 
  1962. (short form "F") is as follows. 
  1963.  
  1964.  
  1965.      FILE obj_spec{,obj_spec} 
  1966.  
  1967.      obj_spec ::= obj_file[(obj_module)] 
  1968.               | library_file[(obj_module)] 
  1969.  
  1970.  where 
  1971.       description 
  1972.  
  1973.  obj_file 
  1974.       is a file specification for the name of an object file.  If no file 
  1975.       extension is specified, a file extension of "obj" is assumed if you are 
  1976.       running a DOS, OS/2 or Windows-hosted version of the Watcom Linker. 
  1977.       Also, if you are running a DOS, OS/2 or Windows-hosted version of the 
  1978.       Watcom Linker, the object file specification can contain wild cards (*, 
  1979.       ?).  A file extension of "o" is assumed if you are running a QNX-hosted 
  1980.       version of the Watcom Linker. 
  1981.  
  1982.  library_file 
  1983.       is a file specification for the name of a library file.  Note that the 
  1984.       file extension of the library file (usually "lib") must be specified; 
  1985.       otherwise an object file will be assumed.  When a library file is 
  1986.       specified, all object files in the library are included (whether required 
  1987.       or not). 
  1988.  
  1989.  obj_module 
  1990.       is the name of an object module defined in an object or library file. 
  1991.  
  1992.  Consider the following example. 
  1993.  
  1994.  Example: 
  1995.  
  1996.     wlink system my_os f \math\sin, mycos 
  1997.  
  1998.  The Watcom Linker is instructed to process the following object files: 
  1999.  
  2000.  
  2001.     \math\sin.obj 
  2002.     mycos.obj 
  2003.  
  2004.  The object file "mycos.obj" is located in the current directory since no path 
  2005.  was specified. 
  2006.  
  2007.  More than one "FILE" directive may be used.  The following example is 
  2008.  equivalent to the preceding one. 
  2009.  
  2010.  Example: 
  2011.  
  2012.     wlink system my_os f \math\sin f mycos 
  2013.  
  2014.  Thus, other directives may be placed between lists of object files. 
  2015.  
  2016.  The "FILE" directive can also specify object modules from a library file or 
  2017.  object file.  Consider the following example. 
  2018.  
  2019.  Example: 
  2020.  
  2021.     wlink system my_os f \math\math.lib(sin) 
  2022.  
  2023.  The Watcom Linker is instructed to process the object module "sin" contained 
  2024.  in the library file "math.lib" in the directory "\math". 
  2025.  
  2026.  In the following example, the Watcom Linker will process the object module 
  2027.  "sin" contained in the object file "math.obj" in the directory "\math". 
  2028.  
  2029.  Example: 
  2030.  
  2031.     wlink system my_os f \math\math(sin) 
  2032.  
  2033.  In the following example, the Watcom Linker will include all object modules 
  2034.  contained in the library file "math.lib" in the directory "\math". 
  2035.  
  2036.  Example: 
  2037.  
  2038.     wlink system my_os f \math\math.lib 
  2039.  
  2040.  
  2041. ΓòÉΓòÉΓòÉ 3.22. The FORMAT Directive ΓòÉΓòÉΓòÉ
  2042.  
  2043.  
  2044. Formats:  All 
  2045.  
  2046. The "FORMAT" directive is used to specify the format of the executable file 
  2047. that the Watcom Linker is to generate.  The format of the "FORMAT" directive 
  2048. (short form "FORM") is as follows. 
  2049.  
  2050.  
  2051.      FORMAT form 
  2052.  
  2053.      form ::= DOS [COM] 
  2054.            | WINDOWS [win_dll] [MEMORY] [FONT] 
  2055.            | WINDOWS NT [TNT] [dll_attrs] 
  2056.            | OS2 [os2_type] [dll_attrs | os2_attrs] 
  2057.            | PHARLAP [EXTENDED | REX | SEGMENTED] 
  2058.            | NOVELL [NLM | LAN | DSK | NAM] 'description' 
  2059.            | QNX [FLAT] 
  2060.            | ELF [DLL] 
  2061.  
  2062.      win_dll ::= DLL [INITGLOBAL | INITINSTANCE] 
  2063.  
  2064.      dll_attrs ::= DLL [INITGLOBAL | INITINSTANCE] 
  2065.               [TERMINSTANCE | TERMGLOBAL] 
  2066.  
  2067.      os2_type ::= FLAT | LE | LX 
  2068.  
  2069.      os2_attrs ::= PM | PMCOMPATIBLE | FULLSCREEN 
  2070.                | PHYSDEVICE | VIRTDEVICE 
  2071.  
  2072.  where 
  2073.       description 
  2074.  
  2075.  DOS 
  2076.       (short form "D") tells the Watcom Linker to generate a DOS "EXE" file. 
  2077.  
  2078.       The name of the executable file will have extension "exe".  If "COM" is 
  2079.       specified, a DOS "COM" file will be generated in which case the name of 
  2080.       the executable file will have extension "com".  Note that these default 
  2081.       extensions can be overridden by using the "NAME" directive to name the 
  2082.       executable file. 
  2083.  
  2084.       Not all programs can be generated in the "COM" format.  The following 
  2085.       rules must be followed. 
  2086.  
  2087.         1. The program must consist of only one physical segment.  This implies 
  2088.            that the size of the program (code and data) must be less than 64k. 
  2089.  
  2090.         2. The program must not contain any segment relocation.  A warning 
  2091.            message will be issued by the Watcom Linker each time a segment 
  2092.            relocation is encountered. 
  2093.       A DOS "COM" file cannot contain debugging information.  If you wish to 
  2094.       debug a DOS "COM" file, you must use the "SYMFILE" option to instruct the 
  2095.       Watcom Linker to place the debugging information in a separate file. 
  2096.  
  2097.       For more information on DOS executable file formats, see the chapter 
  2098.       entitled DOS:  The DOS Executable File Format. 
  2099.  
  2100.  WINDOWS 
  2101.       tells the Watcom Linker to generate a Win16 (16-bit Windows) executable 
  2102.       file. 
  2103.  
  2104.       The name of the executable file will have extension "exe".  If "DLL" 
  2105.       (short form "DL") is specified, a Dynamic Link Library will be generated; 
  2106.       the name of the executable file will also have extension "exe".  Note 
  2107.       that these default extensions can be overridden by using the "NAME" 
  2108.       directive to name the executable file. 
  2109.  
  2110.       Specifying "INITGLOBAL" (short form "INITG") will cause Windows to call 
  2111.       an initialization routine the first time the Dynamic Link Library is 
  2112.       loaded.  The "INITGLOBAL" option should be used with "OPTION ONEAUTODATA" 
  2113.       (the default for Dynamic Link Libraries).  If the "INITGLOBAL" option is 
  2114.       used with "OPTION MANYAUTODATA", the initialization code will be called 
  2115.       once for the first data segment allocated but not for subsequent 
  2116.       allocations (this is generally not desirable behaviour and will likely 
  2117.       cause a program fault). 
  2118.  
  2119.       Specifying "INITINSTANCE" (short form "INITI") will cause Windows to call 
  2120.       an initialization routine each time the Dynamic Link Library is used by a 
  2121.       process.  The "INITINSTANCE" option should be used with "OPTION 
  2122.       MANYAUTODATA" (the default for executable programs). 
  2123.  
  2124.       In either case, the initialization routine is defined by the start 
  2125.       address.  If neither "INITGLOBAL" or "INITINSTANCE" is specified, 
  2126.       "INITGLOBAL" is assumed. 
  2127.  
  2128.       Specifying "MEMORY" (short form "MEM") indicates that the application 
  2129.       will run in standard or enhanced mode.  If Windows 3.0 is running in 
  2130.       standard and enhanced mode, and "MEMORY" is not specified, a warning 
  2131.       message will be issued.  The "MEMORY" specification was used in the 
  2132.       transition from Windows 2.0 to Windows 3.0.  The "MEMORY" specification 
  2133.       is ignored in Windows 3.1 or later. 
  2134.  
  2135.       Specifying "FONT" (short form "FO") indicates that the 
  2136.       proportional-spaced system font can be used.  Otherwise, the old-style 
  2137.       mono-spaced system font will be used.  The "FONT" specification was used 
  2138.       in the transition from Windows 2.0 to Windows 3.0.  The "FONT" 
  2139.       specification is ignored in Windows 3.1 or later. 
  2140.  
  2141.       For more information on Windows executable file formats, see the chapter 
  2142.       entitled Win16:  The Win16 Executable and DLL File Formats. 
  2143.  
  2144.  WINDOWS NT 
  2145.       tells the Watcom Linker to generate a Win32 executable file ("PE" 
  2146.       format). 
  2147.  
  2148.       If "TNT" is specified, an executable for the Phar Lap TNT DOS extender is 
  2149.       created.  A "PL" format (rather than "PE") executable is created so that 
  2150.       the Phar Lap TNT DOS extender will always run the application (including 
  2151.       under Windows NT). 
  2152.  
  2153.       If "DLL" (short form "DL") is specified, a Dynamic Link Library will be 
  2154.       generated in which case the name of the executable file will have 
  2155.       extension "dll".  Note that these default extensions can be overridden by 
  2156.       using the "NAME" directive to name the executable file. 
  2157.  
  2158.       Specifying "INITGLOBAL" (short form "INITG") will cause the 
  2159.       initialization routine to be called the first time the Dynamic Link 
  2160.       Library is loaded. 
  2161.  
  2162.       Specifying "INITINSTANCE" (short form "INITI") will cause the 
  2163.       initialization routine to be called each time the Dynamic Link Library is 
  2164.       referenced by a process. 
  2165.  
  2166.       In either case, the initialization routine is defined by the start 
  2167.       address.  If neither "INITGLOBAL" or "INITINSTANCE" is specified, 
  2168.       "INITGLOBAL" is assumed. 
  2169.  
  2170.       It is also possible to specify whether the initialization routine is to 
  2171.       be called at DLL termination or not.  Specifying "TERMGLOBAL" (short form 
  2172.       "TERMG") will cause the initialization routine to be called when the last 
  2173.       instance of the Dynamic Link Library is terminated.  Specifying 
  2174.       "TERMINSTANCE" (short form "TERMI") will cause the initialization routine 
  2175.       to be called each time an instance of the Dynamic Link Library is 
  2176.       terminated.  Note that the initialization routine is passed an argument 
  2177.       indicating whether it is being called during DLL initialization or DLL 
  2178.       termination.  If "INITINSTANCE" is used and no termination option is 
  2179.       specified, "TERMINSTANCE" is assumed.  If "INITGLOBAL" is used and no 
  2180.       termination option is specified, "TERMGLOBAL" is assumed. 
  2181.  
  2182.       For more information on Windows NT executable file formats, see the 
  2183.       chapter entitled Win32:  The Win32 Executable and DLL File Formats. 
  2184.  
  2185.  OS2 
  2186.       tells the Watcom Linker to generate an OS/2 executable file format. 
  2187.  
  2188.       The name of the executable file will have extension "exe".  If "LE" is 
  2189.       specified, an early form of the OS/2 32-bit linear executable will be 
  2190.       generated.  This executable file format is required by Tenberry 
  2191.       Software's DOS/4G and DOS/4GW DOS extenders. 
  2192.  
  2193.       In order to improve load time and minimize the size of the executable 
  2194.       file, the OS/2 32-bit linear executable file format was changed.  If "LX" 
  2195.       or "FLAT" (short form "FL") is specified, the new form of the OS/2 32-bit 
  2196.       linear executable will be generated.  This executable file format is 
  2197.       required by the FlashTek DOS extender and 32-bit OS/2 executables. 
  2198.  
  2199.       If "FLAT", "LX" or "LE" is not specified, an OS/2 16-bit executable will 
  2200.       be generated. 
  2201.  
  2202.       If "DLL" (short form "DL") is specified, a Dynamic Link Library will be 
  2203.       generated in which case the name of the executable file will have 
  2204.       extension "dll".  Note that these default extensions can be overridden by 
  2205.       using the "NAME" directive to name the executable file. 
  2206.  
  2207.       Specifying "INITGLOBAL" (short form "INITG") will cause the 
  2208.       initialization routine to be called the first time the Dynamic Link 
  2209.       Library is loaded.  The "INITGLOBAL" option should be used with "OPTION 
  2210.       ONEAUTODATA" (the default for Dynamic Link Libraries).  If the 
  2211.       "INITGLOBAL" option is used with "OPTION MANYAUTODATA", the 
  2212.       initialization code will be called once for the first data segment 
  2213.       allocated but not for subsequent allocations (this is generally not 
  2214.       desirable behaviour and will likely cause a program fault). 
  2215.  
  2216.       Specifying "INITINSTANCE" (short form "INITI") will cause the 
  2217.       initialization routine to be called each time the Dynamic Link Library is 
  2218.       referenced by a process.  The "INITINSTANCE" option should be used with 
  2219.       "OPTION MANYAUTODATA" (the default for executable programs). 
  2220.  
  2221.       In either case, the initialization routine is defined by the start 
  2222.       address.  If neither "INITGLOBAL" or "INITINSTANCE" is specified, 
  2223.       "INITGLOBAL" is assumed. 
  2224.  
  2225.       For OS/2 32-bit linear executable files, it is also possible to specify 
  2226.       whether the initialization routine is to be called at DLL termination or 
  2227.       not.  Specifying "TERMGLOBAL" (short form "TERMG") will cause the 
  2228.       initialization routine to be called when the last instance of the Dynamic 
  2229.       Link Library is terminated.  Specifying "TERMINSTANCE" (short form 
  2230.       "TERMI") will cause the initialization routine to be called each time an 
  2231.       instance of the Dynamic Link Library is terminated.  Note that the 
  2232.       initialization routine is passed an argument indicating whether it is 
  2233.       being called during DLL initialization or DLL termination.  If 
  2234.       "INITINSTANCE" is used and no termination option is specified, 
  2235.       "TERMINSTANCE" is assumed.  If "INITGLOBAL" is used and no termination 
  2236.       option is specified, "TERMGLOBAL" is assumed. 
  2237.  
  2238.       If "PM" is specified, a Presentation Manager application will be created. 
  2239.       The application uses the API provided by the Presentation Manager and 
  2240.       must be executed in the Presentation Manager environment. 
  2241.  
  2242.       lf "PMCOMPATIBLE" (short form "PMC") is specified, an application 
  2243.       compatible with Presentation Manager will be created.  The application 
  2244.       can run inside the Presentation Manager or it can run in a separate 
  2245.       screen group.  An application can be of this type if it uses the proper 
  2246.       subset of OS/2 video, keyboard, and mouse functions supported in the 
  2247.       Presentation Manager applications.  This is the default. 
  2248.  
  2249.       If "FULLSCREEN" (short form "FULL") is specified, an OS/2 full screen 
  2250.       application will be created.  The application will run in a separate 
  2251.       screen group from the Presentation Manager. 
  2252.  
  2253.       If "PHYSDEVICE" (short form "PHYS") is specified, the executable file is 
  2254.       marked as a physical device driver. 
  2255.  
  2256.       If "VIRTDEVICE" (short form "VIRT") is specified, the executable file is 
  2257.       marked as a virtual device driver. 
  2258.  
  2259.       For more information on OS/2 executable file formats, see the chapter 
  2260.       entitled OS/2:  The OS/2 Executable and DLL File Formats. 
  2261.  
  2262.  PHARLAP 
  2263.       (short form "PHAR") tells the Watcom Linker to generate an executable 
  2264.       file that will run under Phar Lap's 386|DOS-Extender. 
  2265.  
  2266.       There are 4 forms of executable files:  simple, extended, relocatable and 
  2267.       segmented.  If "EXTENDED" (short form "EXT") is specified, an extended 
  2268.       form of the executable file with file extension "exp" will be generated. 
  2269.       If "REX" is specified, a relocatable executable file with file extension 
  2270.       "rex" will be generated.  If "SEGMENTED" (short form "SEG") is specified, 
  2271.       a segmented executable file with file extension "exp" will be generated. 
  2272.       If neither "EXTENDED", "REX" or "SEGMENTED" is specified, a simple 
  2273.       executable file with file extension "exp" will be generated.  Note that 
  2274.       the default file extensions can be overridden by using the "NAME" 
  2275.       directive to name the executable file. 
  2276.  
  2277.       The simple form is for flat model 386 applications.  It is the only 
  2278.       format that can be loaded by earlier versions of 386|DOS-Extender 
  2279.       (earlier than 1.2). 
  2280.  
  2281.       The extended form is used for flat model applications that have been 
  2282.       linked in a way which requires a method of specifying more information 
  2283.       for 386|DOS-Extender than possible with the simple form. 
  2284.  
  2285.       The relocatable form is similar to the simple form.  Unique to the 
  2286.       relocatable form is an offset relocation table.  This allows the loader 
  2287.       to load the program at any location it chooses. 
  2288.  
  2289.       The segmented form is used for embedded system applications like Intel 
  2290.       RMX.  These executables cannot be loaded by 386|DOS-Extender. 
  2291.  
  2292.       A simple form of the executable file is generated in all but the 
  2293.       following cases. 
  2294.  
  2295.         1. "EXTENDED" is specified in the "FORMAT" directive. 
  2296.  
  2297.         2. The "RUNTIME" directive is specified.  Options specified by the 
  2298.            "RUNTIME" directive can only be specified in the extended form of 
  2299.            the executable file. 
  2300.  
  2301.         3. The "OFFSET" option is specified.  The value specified in the 
  2302.            "OFFSET" option can only be specified in the extended form of the 
  2303.            executable file. 
  2304.  
  2305.         4. "REX" is specified in the "FORMAT" directive.  In this case, the 
  2306.            relocatable form will be generated.  You must not specify the 
  2307.            "RUNTIME" directive or the "OFFSET" option when generating the 
  2308.            relocatable form. 
  2309.  
  2310.         5. "SEGMENTED" is specified in the "FORMAT" directive.  In this case, 
  2311.            the segmented form will be generated. 
  2312.       For more information on Phar Lap executable file formats, see the chapter 
  2313.       entitled Phar Lap:  The Phar Lap Executable File Format. 
  2314.  
  2315.  NOVELL 
  2316.       (short form "NOV") tells the Watcom Linker to generate a NetWare 386 
  2317.       executable file, more commonly called a NetWare Loadable Module (NLM). 
  2318.  
  2319.       NLMs are further classified according to their function.  The executable 
  2320.       file will have a file extension that depends on the class of the NLM 
  2321.       being generated.  The following describes the classification of NLMs. 
  2322.  
  2323.       LAN 
  2324.                 instructs the Watcom Linker to generate a LAN driver.  A LAN 
  2325.                 driver is a device driver for Local Area Network hardware.  A 
  2326.                 file extension of "lan" is used for the name of the executable 
  2327.                 file. 
  2328.  
  2329.       DSK 
  2330.                 instructs the Watcom Linker to generate a disk driver.  A file 
  2331.                 extension of "dsk" is used for the name of the executable file. 
  2332.  
  2333.       NAM 
  2334.                 instructs the Watcom Linker to generate a file system 
  2335.                 name-space support module.  A file extension of "nam" is used 
  2336.                 for the name of the executable file. 
  2337.  
  2338.       NLM 
  2339.                 instructs the Watcom Linker to generate a utility or server 
  2340.                 application.  This is the default.  A file extension of "nlm" 
  2341.                 is used for the name of the executable file. 
  2342.  
  2343.       description 
  2344.                 is a textual description of the program being linked. 
  2345.       For more information on NetWare 386 executable file formats, see the 
  2346.       chapter entitled NetWare:  The NetWare 386 Executable File Format. 
  2347.  
  2348.  QNX 
  2349.       tells the Watcom Linker to generate a QNX executable file. 
  2350.  
  2351.       If "FLAT" (short form "FL") is specified, a 32-bit flat executable file 
  2352.       is generated. 
  2353.  
  2354.       Under QNX, no file extension is added to the executable file name. 
  2355.  
  2356.       Under other operating systems, the name of the executable file will have 
  2357.       the extension "qnx".  Note that this default extension can be overridden 
  2358.       by using the "NAME" directive to name the executable file. 
  2359.  
  2360.       For more information on QNX executable file formats, see the chapter 
  2361.       entitled QNX:  The QNX Executable File Format. 
  2362.  
  2363.  ELF 
  2364.       tells the Watcom Linker to generate an ELF format executable file. 
  2365.  
  2366.       ELF format DLLs can also be created. 
  2367.  
  2368.       For more information on ELF executable file formats, see the chapter 
  2369.       entitled ELF:  The ELF Executable File Format. 
  2370.  
  2371.  If no "FORMAT" directive is specified, the executable file format will be 
  2372.  selected for each of the following host systems in the way described. 
  2373.  
  2374.  DOS 
  2375.       If 16-bit object files are encountered, a 16-bit DOS executable will be 
  2376.       created.  If 32-bit object files are encountered, a 32-bit DOS/4G 
  2377.       executable will be created. 
  2378.  
  2379.  OS/2 
  2380.       If 16-bit object files are encountered, a 16-bit OS/2 executable will be 
  2381.       created.  If 32-bit object files are encountered, a 32-bit OS/2 
  2382.       executable will be created. 
  2383.  
  2384.  QNX 
  2385.       If 16-bit object files are encountered, a 16-bit QNX executable will be 
  2386.       created.  If 32-bit object files are encountered, a 32-bit QNX executable 
  2387.       will be created. 
  2388.  
  2389.  Windows NT 
  2390.       If 16-bit object files are encountered, a 16-bit Windows executable will 
  2391.       be created.  If 32-bit object files are encountered, a 32-bit Win32 
  2392.       executable will be created. 
  2393.  
  2394.  Windows 95 
  2395.       If 16-bit object files are encountered, a 16-bit Windows executable will 
  2396.       be created.  If 32-bit object files are encountered, a 32-bit Win32 
  2397.       executable will be created. 
  2398.  
  2399.  
  2400. ΓòÉΓòÉΓòÉ 3.23. The HEAPSIZE Option ΓòÉΓòÉΓòÉ
  2401.  
  2402.  
  2403. Formats:  OS/2, QNX, Win16, Win32 
  2404.  
  2405. The "HEAPSIZE" option specifies the size of the heap required by the 
  2406. application.  The format of the "HEAPSIZE" option (short form "H") is as 
  2407. follows. 
  2408.  
  2409.  
  2410.      OPTION HEAPSIZE=n 
  2411.  
  2412.  where 
  2413.       description 
  2414.  
  2415.  n 
  2416.       represents a value.  The complete form of n is the following. 
  2417.  
  2418.  
  2419.          [0x]d{d}[k|m] 
  2420.  
  2421.       d represents a decimal digit.  If 0x is specified, the string of digits 
  2422.       represents a hexadecimal number.  If k is specified, the value is 
  2423.       multiplied by 1024.  If m is specified, the value is multiplied by 
  2424.       1024*1024. 
  2425.  
  2426.  n specifies the size of the heap.  The default heap size is 0 bytes.  The 
  2427.  maximum value of n is 65536 (64K) for 16-bit applications and 4G for 32-bit 
  2428.  applications which is the maximum size of a physical segment.  Actually, for a 
  2429.  particular application, the maximum value of n is 64K or 4G less the size of 
  2430.  group "DGROUP". 
  2431.  
  2432.  
  2433. ΓòÉΓòÉΓòÉ 3.24. The HELP Option ΓòÉΓòÉΓòÉ
  2434.  
  2435.  
  2436. Formats:  NetWare 
  2437.  
  2438. The "HELP" option specifies the file name of an internationalized help file 
  2439. whose language corresponds to the message file bound to this NLM. 
  2440.  
  2441. The format of the "HELP" option (short form "HE") is as follows. 
  2442.  
  2443.  
  2444.      OPTION HELP=help_file 
  2445.  
  2446.  where 
  2447.       description 
  2448.  
  2449.  help_file 
  2450.       is the name of the help file. 
  2451.  
  2452.  
  2453. ΓòÉΓòÉΓòÉ 3.25. The IMPFILE Option ΓòÉΓòÉΓòÉ
  2454.  
  2455.  
  2456. Formats:  NetWare, OS/2, Win16, Win32 
  2457.  
  2458. The "IMPFILE" option requests the linker to produce a Watcom Library Manager 
  2459. command file that can be used to create an import library that corresponds to 
  2460. the DLL that is being generated.  This option is useful in situations where the 
  2461. Watcom Linker cannot create an import library file when you have specified the 
  2462. "IMPLIB" option (i.e., the linker fails to launch Watcom Library Manager). 
  2463.  
  2464. The format of the "IMPFILE" option (short form "IMPF") is as follows. 
  2465.  
  2466.  
  2467.      OPTION IMPFILE[=imp_file] 
  2468.  
  2469.  where 
  2470.       description 
  2471.  
  2472.  imp_file 
  2473.       is a file specification for the name of the command file that can be used 
  2474.       to create the import library file using the Watcom Library Manager.  If 
  2475.       no file extension is specified, no file extension is assumed. 
  2476.  
  2477.  By default, no command file is generated.  Specifying this option causes the 
  2478.  linker to generate an import library command file.  The import library command 
  2479.  file contains a list of the entry points in your DLL.  When this command file 
  2480.  is processed by the Watcom Library Manager, an import library file will be 
  2481.  produced. 
  2482.  
  2483.  If no file name is specified, the import library command file will have a 
  2484.  default file extension of "lbc" and the same file name as the DLL file.  Note 
  2485.  that the import library command file will be created in the same directory as 
  2486.  the DLL file.  The DLL file path and name can be specified in the "NAME" 
  2487.  directive. 
  2488.  
  2489.  Alternatively, a library command file path and name can be specified.  The 
  2490.  following directive instructs the linker to generate a import library command 
  2491.  file and call it "mylib.lcf" regardless of the name of the executable file. 
  2492.  
  2493.  
  2494.     option impfile=mylib.lcf 
  2495.  
  2496.  You can also specify a path and/or file extension when using the "IMPFILE=" 
  2497.  form of the "IMPFILE" option. 
  2498.  
  2499.  
  2500. ΓòÉΓòÉΓòÉ 3.26. The IMPLIB Option ΓòÉΓòÉΓòÉ
  2501.  
  2502.  
  2503. Formats:  NetWare, OS/2, Win16, Win32 
  2504.  
  2505. The "IMPLIB" option requests the linker to produce an import library that 
  2506. corresponds to the DLL that is being generated.  The format of the "IMPLIB" 
  2507. option (short form "IMPL") is as follows. 
  2508.  
  2509.  
  2510.      OPTION IMPLIB[=imp_lib] 
  2511.  
  2512.  where 
  2513.       description 
  2514.  
  2515.  imp_lib 
  2516.       is a file specification for the name of the import library file.  If no 
  2517.       file extension is specified, a file extension of "lib" is assumed. 
  2518.  
  2519.  By default, no library file is generated.  Specifying this option causes the 
  2520.  Watcom Linker to generate an import library file.  The import library file 
  2521.  contains a list of the entry points in your DLL. 
  2522.  
  2523.  If no file name is specified, the import library file will have a default file 
  2524.  extension of "lib" and the same file name as the DLL file.  Note that the 
  2525.  import library file will be created in the same directory as the DLL file. The 
  2526.  DLL file path and name can be specified in the "NAME" directive. 
  2527.  
  2528.  Alternatively, a library file path and name can be specified.  The following 
  2529.  directive instructs the linker to generate a library file and call it 
  2530.  "mylib.imp" regardless of the name of the executable file. 
  2531.  
  2532.  
  2533.     option implib=mylib.imp 
  2534.  
  2535.  You can also specify a path and/or file extension when using the "IMPLIB=" 
  2536.  form of the "IMPLIB" option. 
  2537.  
  2538.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2539.  
  2540.   Note:  At present, the linker spawns the Watcom Library Manager to create the 
  2541.  import library file. 
  2542.  
  2543.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2544.  
  2545.  
  2546. ΓòÉΓòÉΓòÉ 3.27. The IMPORT Directive ΓòÉΓòÉΓòÉ
  2547.  
  2548.  
  2549. Formats:  ELF, NetWare, OS/2, Win16, Win32 
  2550.  
  2551. The "IMPORT" directive is used to tell the Watcom Linker what symbols are 
  2552. defined externally in other executables. 
  2553.  
  2554.  
  2555. ΓòÉΓòÉΓòÉ 3.27.1. IMPORT - OS/2, Win16, Win32 only ΓòÉΓòÉΓòÉ
  2556.  
  2557.  
  2558. The "IMPORT" directive describes a function that belongs to a Dynamic Link 
  2559. Library.  The format of the "IMPORT" directive (short form "IMP") is as 
  2560. follows. 
  2561.  
  2562.  
  2563.      IMPORT import{,import} 
  2564.  
  2565.      import ::= internal_name module_name[.entry_name | ordinal] 
  2566.  
  2567.  where 
  2568.       description 
  2569.  
  2570.  internal_name 
  2571.       is the name the application used to call the function. 
  2572.  
  2573.  module_name 
  2574.       is the name of the Dynamic Link Library.  Note that this need not be the 
  2575.       same as the file name of the executable file containing the Dynamic Link 
  2576.       Library.  This name corresponds to the name specified by the "MODNAME" 
  2577.       option when the Dynamic Link Library was created. 
  2578.  
  2579.  entry_name 
  2580.       is the actual name of the function as defined in the Dynamic Link 
  2581.       Library. 
  2582.  
  2583.  ordinal 
  2584.       is the ordinal value of the function.  The ordinal number is an alternate 
  2585.       method that can be used to reference a function in a Dynamic Link 
  2586.       Library. 
  2587.  
  2588.  Notes: 
  2589.  
  2590.    1. By default, the Watcom C and C++ compilers append an underscore ('_') to 
  2591.       all function names.  This should be considered when specifying 
  2592.       internal_name and entry_name in an "IMPORT" directive. 
  2593.  
  2594.    2. If the name contains characters that are special to the linker then the 
  2595.       name may be placed inside apostrophes (e.g., import 'myfunc@8'). 
  2596.  
  2597.  The preferred method to resolve references to Dynamic Link Libraries is 
  2598.  through the use of import libraries.  See the sections entitled OS/2:  Using a 
  2599.  Dynamic Link Library, Win16:  Using a Dynamic Link Library, or Win32:  Using a 
  2600.  Dynamic Link Library for more information on import libraries. 
  2601.  
  2602.  
  2603. ΓòÉΓòÉΓòÉ 3.27.2. IMPORT - ELF only ΓòÉΓòÉΓòÉ
  2604.  
  2605.  
  2606. The "IMPORT" directive is used to tell the Watcom Linker what symbols are 
  2607. defined externally in other executables.  The format of the "IMPORT" directive 
  2608. (short form "IMP") is as follows. 
  2609.  
  2610.  
  2611.      IMPORT external_name{,external_name} 
  2612.  
  2613.  where 
  2614.       description 
  2615.  
  2616.  external_name 
  2617.       is the name of the external symbol. 
  2618.  
  2619.  Notes: 
  2620.  
  2621.    1. By default, the Watcom C and C++ compilers append an underscore ('_') to 
  2622.       all function names.  This should be considered when specifying 
  2623.       external_name in an "IMPORT" directive. 
  2624.  
  2625.    2. If the name contains characters that are special to the linker then the 
  2626.       name may be placed inside apostrophes (e.g., import 'myfunc@8'). 
  2627.  
  2628.  
  2629. ΓòÉΓòÉΓòÉ 3.27.3. IMPORT - Netware only ΓòÉΓòÉΓòÉ
  2630.  
  2631.  
  2632. The "IMPORT" directive is used to tell the Watcom Linker what symbols are 
  2633. defined externally in other NLMs.  The format of the "IMPORT" directive (short 
  2634. form "IMP") is as follows. 
  2635.  
  2636.  
  2637.      IMPORT external_name{,external_name} 
  2638.  
  2639.  where 
  2640.       description 
  2641.  
  2642.  external_name 
  2643.       is the name of the external symbol. 
  2644.  
  2645.  Notes: 
  2646.  
  2647.    1. If the name contains characters that are special to the linker then the 
  2648.       name may be placed inside apostrophes (e.g., import 'myfunc@8'). 
  2649.  
  2650.  If an NLM contains external symbols, the NLMs that define the external symbols 
  2651.  must be loaded before the NLM that references the external symbols is loaded. 
  2652.  
  2653.  
  2654. ΓòÉΓòÉΓòÉ 3.28. The @ Directive ΓòÉΓòÉΓòÉ
  2655.  
  2656.  
  2657. The "@" directive instructs the Watcom Linker to process directives from an 
  2658. alternate source.  The format of the "@" directive is as follows. 
  2659.  
  2660.  
  2661.      @directive_var 
  2662.        or 
  2663.      @directive_file 
  2664.  
  2665.  where 
  2666.       description 
  2667.  
  2668.  directive_var 
  2669.       is the name of an environment variable.  The directives specified by the 
  2670.       value of directive_var will be processed. 
  2671.  
  2672.  directive_file 
  2673.       is a file specification for the name of a linker directive file.  A file 
  2674.       extension of "lnk" is assumed if no file extension is specified. 
  2675.  
  2676.  The environment variable approach to specifying linker directives allows you 
  2677.  to specify commonly used directives without having to specify them each time 
  2678.  you invoke the Watcom Linker.  If the environment variable "wlink" is set as 
  2679.  in the following example, 
  2680.  
  2681.  
  2682.     set wlink=debug watcom all option map, verbose library math 
  2683.     wlink @wlink 
  2684.  
  2685.  then each time the Watcom Linker is invoked, full debugging information will 
  2686.  be generated, a verbose map file will be created, and the library file 
  2687.  "math.lib" will be searched for undefined references. 
  2688.  
  2689.  A linker directive file is useful, for example, when the linker input consists 
  2690.  of a large number of object files and you do not want to type their names on 
  2691.  the command line each time you link your program.  Note that a linker 
  2692.  directive file can also include other linker directive files. 
  2693.  
  2694.  Let the file "memos.lnk" be a directive file containing the following lines. 
  2695.  
  2696.  
  2697.     system my_os 
  2698.     name memos 
  2699.     file memos 
  2700.     file actions 
  2701.     file read 
  2702.     file msg 
  2703.     file prompt 
  2704.     file memmgr 
  2705.     library \termio\screen 
  2706.     library \termio\keyboard 
  2707.  
  2708.  Win16 only: 
  2709.       We must also use the "EXPORT" directive to define the window function. 
  2710.       This is done using the following directive. 
  2711.  
  2712.  
  2713.          export window_function 
  2714.  
  2715.  Consider the following example. 
  2716.  
  2717.  Example: 
  2718.  
  2719.     wlink @memos 
  2720.  
  2721.  The Watcom Linker is instructed to process the contents of the directive file 
  2722.  "memos.lnk".  The executable image file will be called "memos.exe".  The 
  2723.  following object files will be loaded from the current directory. 
  2724.  
  2725.  
  2726.     memos.obj 
  2727.     actions.obj 
  2728.     read.obj 
  2729.     msg.obj 
  2730.     prompt.obj 
  2731.     memmgr.obj 
  2732.  
  2733.  If any unresolved symbol references remain after all object files have been 
  2734.  processed, the library files "screen.lib" and "keyboard.lib" in the directory 
  2735.  "\termio" will be searched (in the order listed). 
  2736.  
  2737.  Notes: 
  2738.  
  2739.    1. In the above example, we did not provide the file extension when the 
  2740.       directive file was specified.  The Watcom Linker assumes a file extension 
  2741.       of "lnk" if none is present. 
  2742.  
  2743.    2. It is not necessary to list each object file and library with a separate 
  2744.       directive.  The following linker directive file is equivalent. 
  2745.  
  2746.  
  2747.          system my_os 
  2748.          name memos 
  2749.          file memos,actions,read,msg,prompt,memmgr 
  2750.          library \termio\screen,\termio\keyboard 
  2751.  
  2752.       However, if you want to selectively specify what debugging information 
  2753.       should be included, the first style of directive file will be easier to 
  2754.       use.  This is illustrated in the following sample directive file. 
  2755.  
  2756.  
  2757.          system my_os 
  2758.          name memos 
  2759.          debug watcom lines 
  2760.          file memos 
  2761.          debug watcom all 
  2762.          file actions 
  2763.          debug watcom lines 
  2764.          file read 
  2765.          file msg 
  2766.          file prompt 
  2767.          file memmgr 
  2768.          debug watcom 
  2769.          library \termio\screen 
  2770.          library \termio\keyboard 
  2771.  
  2772.    3. Information for a particular directive can span directive files.  This is 
  2773.       illustrated in the following sample directive file. 
  2774.  
  2775.  
  2776.          system my_os 
  2777.          file memos, actions, read, msg, prompt, memmgr 
  2778.          file @dbgfiles 
  2779.          library \termio\screen 
  2780.          library \termio\keyboard 
  2781.  
  2782.       The directive file "dbgfiles.lnk" contains, for example, those object 
  2783.       files that are used for debugging purposes. 
  2784.  
  2785.  
  2786. ΓòÉΓòÉΓòÉ 3.29. The INCREMENTAL Option ΓòÉΓòÉΓòÉ
  2787.  
  2788.  
  2789. Formats:  ELF, OS/2, PharLap, QNX, Win16, Win32 
  2790.  
  2791. The "INCREMENTAL" option can be used to enable incremental linking. 
  2792. Incremental linking is a process whereby the linker attempts to modify the 
  2793. existing executable file by changing only those portions for which new object 
  2794. files are provided. 
  2795.  
  2796. The format of the "INCREMENTAL" option (short form "INC") is as follows. 
  2797.  
  2798.  
  2799.      OPTION INCREMENTAL[=inc_file_name] 
  2800.  
  2801.  where 
  2802.       description 
  2803.  
  2804.  inc_file_name 
  2805.       is a file specification for the name of the incremental information file. 
  2806.       If no file extension is specified, a file extension of "ilk" is assumed. 
  2807.  
  2808.  This option engages the incremental linking feature of the linker.  This 
  2809.  option must be one of the first options encountered in the list of directives 
  2810.  and options supplied to the linker.  If the option is presented too late, the 
  2811.  linker will issue a diagnostic message. 
  2812.  
  2813.  By default, the incremental information file has the same name as the program 
  2814.  except with an "ilk" extension unless the "NAME" directive has not been seen 
  2815.  yet.  If this is the case then the file is called __WLINK.ILK. 
  2816.  
  2817.  The linker's incremental linking technique is very resistant to changes in the 
  2818.  underlying object files - there are very few cases where an incremental 
  2819.  re-link is not possible.  The options "ELIMINATE" and "VFREMOVAL" cannot be 
  2820.  used at the same time as incremental linking. 
  2821.  
  2822.  It is possible, over time, to accumulate unneeded functions in the executable 
  2823.  by using incremental linking. To guarantee an executable of minimum size, you 
  2824.  can cause a full relink by deleting the ".ilk" file or by not specifying the 
  2825.  "INCREMENTAL" option. 
  2826.  
  2827.  Do not use a post processor like the Watcom Resource Compiler on the 
  2828.  executable file since this will damage the data structures maintained by the 
  2829.  linker.  Add resources to the executable file using the "RESOURCE" option 
  2830.  which is described in The RESOURCE Option. 
  2831.  
  2832.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2833.  
  2834.   Note:  Only Dwarf debugging information is supported with incremental 
  2835.  linking. 
  2836.  
  2837.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  2838.  
  2839.  
  2840. ΓòÉΓòÉΓòÉ 3.30. The INTERNALRELOCS Option ΓòÉΓòÉΓòÉ
  2841.  
  2842.  
  2843. Formats:  OS/2 
  2844.  
  2845. The "INTERNALRELOCS" option is used with LX format executables under 32-bit 
  2846. OS/2.  By default, OS/2 executables do not contain internal relocation 
  2847. information and OS/2 Dynamic Link Libraries do contain internal relocation 
  2848. information.  This option causes the Watcom Linker to include internal 
  2849. relocation information in OS/2 LX format executables. 
  2850.  
  2851. The format of the "INTERNALRELOCS" option (short form "INT") is as follows. 
  2852.  
  2853.  
  2854.      OPTION INTERNALRELOCS 
  2855.  
  2856.  
  2857. ΓòÉΓòÉΓòÉ 3.31. The LANGUAGE Directive ΓòÉΓòÉΓòÉ
  2858.  
  2859.  
  2860. Formats:  All 
  2861.  
  2862. The "LANGUAGE" directive is used to specify the language in which strings in 
  2863. the Watcom Linker directives are specified.  The format of the "LANGUAGE" 
  2864. directive (short form "LANG") is as follows. 
  2865.  
  2866.  
  2867.      LANGUAGE lang 
  2868.  
  2869.      lang ::= JAPANESE | CHINESE | KOREAN 
  2870.  
  2871.  JAPANESE 
  2872.       (short form "JA") specifies that strings are to be handled as if they 
  2873.       contained characters from the Japanese Double-Byte Character Set (DBCS). 
  2874.  
  2875.  CHINESE 
  2876.       (short form "CH") specifies that strings are to be handled as if they 
  2877.       contained characters from the Chinese Double-Byte Character Set (DBCS). 
  2878.  
  2879.  KOREAN 
  2880.       (short form "KO") specifies that strings are to be handled as if they 
  2881.       contained characters from the Korean Double-Byte Character Set (DBCS). 
  2882.  
  2883.  
  2884. ΓòÉΓòÉΓòÉ 3.32. The LIBFILE Directive ΓòÉΓòÉΓòÉ
  2885.  
  2886.  
  2887. Formats:  All 
  2888.  
  2889. The "LIBFILE" directive is used to specify the object files that the Watcom 
  2890. Linker is to process.  The format of the "LIBFILE" directive (short form 
  2891. "LIBF") is as follows. 
  2892.  
  2893.  
  2894.      LIBFILE obj_spec{,obj_spec} 
  2895.  
  2896.      obj_spec ::= obj_file | library_file 
  2897.  
  2898.  where 
  2899.       description 
  2900.  
  2901.  obj_file 
  2902.       is a file specification for the name of an object file.  If no file 
  2903.       extension is specified, a file extension of "obj" is assumed if you are 
  2904.       running a DOS, OS/2 or Windows-hosted version of the Watcom Linker. 
  2905.       Also, if you are running a DOS, OS/2 or Windows-hosted version of the 
  2906.       Watcom Linker, the object file specification can contain wild cards (*, 
  2907.       ?).  A file extension of "o" is assumed if you are running a QNX-hosted 
  2908.       version of the Watcom Linker. 
  2909.  
  2910.  library_file 
  2911.       is a file specification for the name of a library file.  Note that the 
  2912.       file extension of the library file (usually "lib") must be specified; 
  2913.       otherwise an object file will be assumed.  When a library file is 
  2914.       specified, all object files in the library are included (whether required 
  2915.       or not). 
  2916.  
  2917.  The difference between the "LIBFILE" directive and the "FILE" directive is as 
  2918.  follows. 
  2919.  
  2920.    1. When searching for an object or library file specified in a "LIBFILE" 
  2921.       directive, the default directory will be searched first, followed by the 
  2922.       paths specified in the "LIBPATH" directive, and finally the paths 
  2923.       specified in the "LIB" environment variable.  Note that if the object or 
  2924.       library file name contains a path, only the specified path will be 
  2925.       searched. 
  2926.  
  2927.    2. Object or library file names specified in a "LIBFILE" directive will not 
  2928.       be used to create the name of the executable file when no "NAME" 
  2929.       directive is specified. 
  2930.  
  2931.  Essentially, object files that appear in "LIBFILE" directives are viewed as 
  2932.  components of a library that have not been explicitly placed in a library 
  2933.  file. 
  2934.  
  2935.  Consider the following linker directive file. 
  2936.  
  2937.  
  2938.     libpath \libs 
  2939.     libfile mystart 
  2940.     path \objs 
  2941.     file file1, file2 
  2942.  
  2943.  The Watcom Linker is instructed to process the following object files: 
  2944.  
  2945.  
  2946.     \libs\mystart.obj 
  2947.     \objs\file1.obj 
  2948.     \objs\file2.obj 
  2949.  
  2950.  Note that the executable file will have file name "file1" and not "mystart". 
  2951.  
  2952.  
  2953. ΓòÉΓòÉΓòÉ 3.33. The LIBPATH Directive ΓòÉΓòÉΓòÉ
  2954.  
  2955.  
  2956. Formats:  All 
  2957.  
  2958. The "LIBPATH" directive is used to specify the directories that are to be 
  2959. searched for library files appearing in subsequent "LIBRARY" directives and 
  2960. object files appearing in subsequent "LIBFILE" directives.  The format of the 
  2961. "LIBPATH" directive (short form "LIBP") is as follows. 
  2962.  
  2963.  
  2964.      LIBPATH [path_name{;path_name}] 
  2965.  
  2966.  where 
  2967.       description 
  2968.  
  2969.  path_name 
  2970.       is a path name. 
  2971.  
  2972.  Consider a directive file containing the following linker directives. 
  2973.  
  2974.  
  2975.     file test 
  2976.     libpath \math 
  2977.     library trig 
  2978.     libfile newsin 
  2979.  
  2980.  First, the Watcom Linker will process the object file "test.obj" from the 
  2981.  default directory.  The object file "newsin.obj" will then be processed, 
  2982.  searching the default directory first.  If "newsin.obj" is not in the default 
  2983.  directory, the "\math" directory will be searched.  If any unresolved 
  2984.  references remain after processing the object files, the library file 
  2985.  "trig.lib" will be searched.  If the file "trig.lib" does not exist in the 
  2986.  default directory, the "\math" directory will be searched. 
  2987.  
  2988.  It is also possible to specify a list of paths in a "LIBPATH" directive. 
  2989.  Consider the following example. 
  2990.  
  2991.  
  2992.     libpath \newmath;\math 
  2993.     library trig 
  2994.  
  2995.  When processing undefined references, the Watcom Linker will attempt to 
  2996.  process the library file "trig.lib" in the default directory.  If "trig.lib" 
  2997.  does not exist in the default directory, the "\newmath" directory will be 
  2998.  searched.  If "trig.lib" does not exist in the "\newmath" directory, the 
  2999.  "\math" directory will be searched. 
  3000.  
  3001.  If the name of a library file appearing in a "LIBRARY" directive or the the 
  3002.  name of an object file appearing in a "LIBFILE" directive contains a path 
  3003.  specification, only the specified path will be searched. 
  3004.  
  3005.  Note that 
  3006.  
  3007.  
  3008.     libpath path1 
  3009.     libpath path2 
  3010.  
  3011.  is equivalent to the following. 
  3012.  
  3013.  
  3014.     libpath path2;path1 
  3015.  
  3016.  
  3017. ΓòÉΓòÉΓòÉ 3.34. The LIBRARY Directive ΓòÉΓòÉΓòÉ
  3018.  
  3019.  
  3020. Formats:  All 
  3021.  
  3022. The "LIBRARY" directive is used to specify the library files to be searched 
  3023. when unresolved symbols remain after processing all specified input object 
  3024. files.  The format of the "LIBRARY" directive (short form "L") is as follows. 
  3025.  
  3026.  
  3027.      LIBRARY library_file{,library_file} 
  3028.  
  3029.  where 
  3030.       description 
  3031.  
  3032.  library_file 
  3033.       is a file specification for the name of a library file.  If no file 
  3034.       extension is specified, a file extension of "lib" is assumed. 
  3035.  
  3036.  Consider the following example. 
  3037.  
  3038.  Example: 
  3039.  
  3040.     wlink system my_os file trig lib \math\trig, \cmplx\trig 
  3041.  
  3042.  The Watcom Linker is instructed to process the following object file: 
  3043.  
  3044.  
  3045.     trig.obj 
  3046.  
  3047.  If any unresolved symbol references remain after all object files have been 
  3048.  processed, the following library files will be searched: 
  3049.  
  3050.  
  3051.     \math\trig.lib 
  3052.     \cmplx\trig.lib 
  3053.  
  3054.  More than one "LIBRARY" directive may be used.  The following example is 
  3055.  equivalent to the preceding one. 
  3056.  
  3057.  Example: 
  3058.  
  3059.     wlink system my_os f trig lib \math\trig lib \cmplx\trig 
  3060.  
  3061.  Thus other directives may be placed between lists of library files. 
  3062.  
  3063.  
  3064. ΓòÉΓòÉΓòÉ 3.34.1. Searching for Libraries Specified in Environment Variables ΓòÉΓòÉΓòÉ
  3065.  
  3066.  
  3067. The "LIB" environment variable can be used to specify a list of paths that will 
  3068. be searched for library files.  The "LIB" environment variable can be set using 
  3069. the "set" command as follows: 
  3070.  
  3071.  
  3072.    set lib=\graphics\lib;\utility 
  3073.  
  3074. Consider the following "LIBRARY" directive and the above definition of the 
  3075. "LIB" environment variable. 
  3076.  
  3077.  
  3078.    library \mylibs\util, graph 
  3079.  
  3080. If undefined symbols remain after processing all object files specified in all 
  3081. "FILE" directives, the Watcom Linker will resolve these references by searching 
  3082. the following libraries in the specified order. 
  3083.  
  3084.    1. the library file "\mylibs\util.lib" 
  3085.  
  3086.    2. the library file "graph.lib" in the current directory 
  3087.  
  3088.    3. the library file "\graphics\lib\graph.lib" 
  3089.  
  3090.    4. the library file "\utility\graph.lib" 
  3091.  
  3092.  Notes: 
  3093.  
  3094.    1. If a library file specified in a "LIBRARY" directive contains an absolute 
  3095.       path specification, the Watcom Linker will not search any of the paths 
  3096.       specified in the "LIB" environment string for the library file.  Under 
  3097.       QNX, an absolute path specification is one that begins the "/" character. 
  3098.       Under all other operating systems, an absolute path specification is one 
  3099.       that begins with a drive specification or the "\" character. 
  3100.  
  3101.    2. Once a library file has been found, no further elements of the "LIB" 
  3102.       environment variable are searched for other libraries of the same name. 
  3103.       That is, if the library file "\graphics\lib\graph.lib" exists, the 
  3104.       library file "\utility\graph.lib" will not be searched even though 
  3105.       unresolved references may remain. 
  3106.  
  3107.  
  3108. ΓòÉΓòÉΓòÉ 3.34.2. Converting Libraries Created using Phar Lap 386|LIB ΓòÉΓòÉΓòÉ
  3109.  
  3110.  
  3111. Phar Lap's librarian, 386|LIB, creates libraries whose dictionary is a 
  3112. different format from the one used by other librarians.  For this reason, 
  3113. linking an application using the Watcom Linker with libraries created using 
  3114. 386|LIB will not work.  Library files created using 386|LIB must be converted 
  3115. to the form recognized by the Watcom Linker.  This is achieved by issuing the 
  3116. following WLIB command. 
  3117.  
  3118.  
  3119.    wlib newlib +pharlib.lib 
  3120.  
  3121. The library file "pharlib.lib" is a library created using 386|LIB.  The library 
  3122. file "newlib.lib" will be created so that the Watcom Linker can now process it. 
  3123.  
  3124.  
  3125. ΓòÉΓòÉΓòÉ 3.35. The LINEARRELOCS Option ΓòÉΓòÉΓòÉ
  3126.  
  3127.  
  3128. Formats:  QNX 
  3129.  
  3130. The "LINEARRELOCS" option instructs the linker to generate offset fixups in 
  3131. addition to the normal segment fixups.  The offset fixups allow the system to 
  3132. move pieces of code and data that were loaded at a particular offset within a 
  3133. segment to another offset within the same segment. 
  3134.  
  3135. The format of the "LINEARRELOCS" option (short form "LI") is as follows. 
  3136.  
  3137.  
  3138.      OPTION LINEARRELOCS 
  3139.  
  3140.  
  3141. ΓòÉΓòÉΓòÉ 3.36. The LONGLIVED Option ΓòÉΓòÉΓòÉ
  3142.  
  3143.  
  3144. Formats:  QNX 
  3145.  
  3146. The "LONGLIVED" option specifies that the application being linked will reside 
  3147. in memory, or be active, for a long period of time (e.g., background tasks). 
  3148. The memory manager, knowing an application is "LONGLIVED", allocates memory for 
  3149. the application so as to reduce fragmentation. 
  3150.  
  3151. The format of the "LONGLIVED" option (short form "LO") is as follows. 
  3152.  
  3153.  
  3154.      OPTION LONGLIVED 
  3155.  
  3156.  
  3157. ΓòÉΓòÉΓòÉ 3.37. The MANGLEDNAMES Option ΓòÉΓòÉΓòÉ
  3158.  
  3159.  
  3160. Formats:  All 
  3161.  
  3162. The "MANGLEDNAMES" option should only be used if you are developing a Watcom 
  3163. C++ application.  Due to the nature of C++, the Watcom C++ compiler generates 
  3164. mangled names for symbols.  A mangled name for a symbol includes the following. 
  3165.  
  3166.    1. symbol name 
  3167.  
  3168.    2. scoping information 
  3169.  
  3170.    3. typing information 
  3171.  
  3172.  This information is stored in a cryptic form with the symbol.  When the linker 
  3173.  encounters a mangled name in an object file, it formats the above information 
  3174.  and produces this name in the map file. 
  3175.  
  3176.  If you would like the linker to produce the mangled name as it appeared in the 
  3177.  object file, specify the "MANGLEDNAMES" option. 
  3178.  
  3179.  The format of the "MANGLEDNAMES" option (short form "MANG") is as follows. 
  3180.  
  3181.  
  3182.       OPTION MANGLEDNAMES 
  3183.  
  3184.  
  3185. ΓòÉΓòÉΓòÉ 3.38. The MANYAUTODATA Option ΓòÉΓòÉΓòÉ
  3186.  
  3187.  
  3188. Formats:  OS/2, Win16 
  3189.  
  3190. The "MANYAUTODATA" option specifies that a copy of the automatic data segment 
  3191. (default data segment defined by the group "DGROUP"), for the program module or 
  3192. Dynamic Link Library (DLL) being created, is made for each instance.  The 
  3193. format of the "MANYAUTODATA" option (short form "MANY") is as follows. 
  3194.  
  3195.  
  3196.      OPTION MANYAUTODATA 
  3197.  
  3198. The default for a program module is "MANYAUTODATA" and for a Dynamic Link 
  3199. Library is "ONEAUTODATA".  If you do not want the data area of a DLL to be 
  3200. shared across multiple applications, then you should specify "OPTION 
  3201. MANYAUTODATA". 
  3202.  
  3203.  Win16: 
  3204.       Note, however, that this attribute is not supported by Windows 3.x for 
  3205.       16-bit DLLs. 
  3206.  
  3207.  You should also see the related section entitled The FORMAT Directive for 
  3208.  information on the "INITINSTANCE", "TERMINSTANCE", "INITGLOBAL", and 
  3209.  "TERMGLOBAL" DLL attributes. 
  3210.  
  3211.  
  3212. ΓòÉΓòÉΓòÉ 3.39. The MAP Option ΓòÉΓòÉΓòÉ
  3213.  
  3214.  
  3215. Formats:  All 
  3216.  
  3217. The "MAP" option controls the generation of a map file.  The format of the 
  3218. "MAP" option (short form "M") is as follows. 
  3219.  
  3220.  
  3221.      OPTION MAP[=map_file] 
  3222.  
  3223.  where 
  3224.       description 
  3225.  
  3226.  map_file 
  3227.       is a file specification for the name of the map file.  If no file 
  3228.       extension is specified, a file extension of "map" is assumed. 
  3229.  
  3230.  By default, no map file is generated.  Specifying this option causes the 
  3231.  Watcom Linker to generate a map file.  The map file is simply a memory map of 
  3232.  your program.  That is, it specifies the relative location of all global 
  3233.  symbols in your program.  The map file also contains the size of your program. 
  3234.  
  3235.  If no file name is specified, the map file will have a default file extension 
  3236.  of "map" and the same file name as the executable file.  Note that the map 
  3237.  file will be created in the current directory even if the executable file name 
  3238.  specified in the "NAME" directive contains a path specification. 
  3239.  
  3240.  Alternatively, a file name can be specified.  The following directive 
  3241.  instructs the linker to generate a map file and call it "myprog.map" 
  3242.  regardless of the name of the executable file. 
  3243.  
  3244.  
  3245.     option map=myprog 
  3246.  
  3247.  You can also specify a path and/or file extension when using the "MAP=" form 
  3248.  of the "MAP" option. 
  3249.  
  3250.  
  3251. ΓòÉΓòÉΓòÉ 3.40. The MAXDATA Option ΓòÉΓòÉΓòÉ
  3252.  
  3253.  
  3254. Formats:  PharLap 
  3255.  
  3256. The format of the "MAXDATA" option (short form "MAXD") is as follows. 
  3257.  
  3258.  
  3259.      OPTION MAXDATA=n 
  3260.  
  3261.  where 
  3262.       description 
  3263.  
  3264.  n 
  3265.       represents a value.  The complete form of n is the following. 
  3266.  
  3267.  
  3268.          [0x]d{d}[k|m] 
  3269.  
  3270.       d represents a decimal digit.  If 0x is specified, the string of digits 
  3271.       represents a hexadecimal number.  If k is specified, the value is 
  3272.       multiplied by 1024.  If m is specified, the value is multiplied by 
  3273.       1024*1024. 
  3274.  
  3275.  n specifies the maximum number of bytes, in addition to the memory required by 
  3276.  executable image, that may be allocated by 386|DOS-Extender at the end of the 
  3277.  loaded executable image.  No more than n bytes will be allocated. 
  3278.  
  3279.  If the "MAXDATA" option is not specified, a default value of hexadecimal 
  3280.  ffffffff is assumed.  This means that 386|DOS-Extender will allocate all 
  3281.  available memory to the program at load time. 
  3282.  
  3283.  
  3284. ΓòÉΓòÉΓòÉ 3.41. The MAXERRORS Option ΓòÉΓòÉΓòÉ
  3285.  
  3286.  
  3287. Formats:  All 
  3288.  
  3289. The "MAXERRORS" option can be used to set a limit on the number of error 
  3290. messages generated by the linker.  Note that this does not include warning 
  3291. messages.  When this limit is reached, the linker will issue a fatal error and 
  3292. terminate. 
  3293.  
  3294. The format of the "MAXERRORS" option (short form "MAXE") is as follows. 
  3295.  
  3296.  
  3297.      OPTION MAXERRORS=n 
  3298.  
  3299.  where 
  3300.       description 
  3301.  
  3302.  n 
  3303.       is the maximum number of error messages issued by the linker. 
  3304.  
  3305.  
  3306. ΓòÉΓòÉΓòÉ 3.42. The MESSAGES Option ΓòÉΓòÉΓòÉ
  3307.  
  3308.  
  3309. Formats:  NetWare 
  3310.  
  3311. The "MESSAGES" option specifies the file name of an internationalized message 
  3312. file that contains the default messages for the NLM.  This is the name of the 
  3313. default message file to load for NLMs that are enabled.  Enabling allows the 
  3314. same NLM to display messages in different languages by switching message files. 
  3315.  
  3316. The format of the "MESSAGES" option (short form "MES") is as follows. 
  3317.  
  3318.  
  3319.      OPTION MESSAGES=msg_file 
  3320.  
  3321.  where 
  3322.       description 
  3323.  
  3324.  msg_file 
  3325.       is the name of the message file. 
  3326.  
  3327.  
  3328. ΓòÉΓòÉΓòÉ 3.43. The MINDATA Option ΓòÉΓòÉΓòÉ
  3329.  
  3330.  
  3331. Formats:  PharLap 
  3332.  
  3333. The format of the "MINDATA" option (short form "MIND") is as follows. 
  3334.  
  3335.  
  3336.      OPTION MINDATA=n 
  3337.  
  3338.  where 
  3339.       description 
  3340.  
  3341.  n 
  3342.       represents a value.  The complete form of n is the following. 
  3343.  
  3344.  
  3345.          [0x]d{d}[k|m] 
  3346.  
  3347.       d represents a decimal digit.  If 0x is specified, the string of digits 
  3348.       represents a hexadecimal number.  If k is specified, the value is 
  3349.       multiplied by 1024.  If m is specified, the value is multiplied by 
  3350.       1024*1024. 
  3351.  
  3352.  n specifies the minimum number of bytes, in addition to the memory required by 
  3353.  executable image, that must be allocated by 386|DOS-Extender at the end of the 
  3354.  loaded executable image.  If n bytes are not available, the program will not 
  3355.  be executed. 
  3356.  
  3357.  If the "MINDATA" option is not specified, a default value of zero is assumed. 
  3358.  This means that 386|DOS-Extender will load the program as long as there is 
  3359.  enough memory for the load image; no extra memory is required. 
  3360.  
  3361.  
  3362. ΓòÉΓòÉΓòÉ 3.44. The MODNAME Option ΓòÉΓòÉΓòÉ
  3363.  
  3364.  
  3365. Formats:  OS/2, Win16, Win32 
  3366.  
  3367. The "MODNAME" option specifies a name to be given to the module being created. 
  3368. The format of the "MODNAME" option (short form "MODN") is as follows. 
  3369.  
  3370.  
  3371.      OPTION MODNAME=module_name 
  3372.  
  3373.  where 
  3374.       description 
  3375.  
  3376.  module_name 
  3377.       is the name of a Dynamic Link Library. 
  3378.  
  3379.  Once a module has been loaded (whether it be a program module or a Dynamic 
  3380.  Link Library), mod_name is the name of the module known to the operating 
  3381.  system.  If the "MODNAME" option is not used to specify a module name, the 
  3382.  default module name is the name of the executable file without the file 
  3383.  extension. 
  3384.  
  3385.  
  3386. ΓòÉΓòÉΓòÉ 3.45. The MODFILE Directive ΓòÉΓòÉΓòÉ
  3387.  
  3388.  
  3389. Formats:  All 
  3390.  
  3391. The "MODFILE" directive instructs the linker that only the specified object 
  3392. files have changed.  The format of the "MODFILE" directive (short form "MODF") 
  3393. is as follows. 
  3394.  
  3395.  
  3396.      MODFILE obj_file{,obj_file} 
  3397.  
  3398.  where 
  3399.       description 
  3400.  
  3401.  obj_file 
  3402.       is a file specification for the name of an object file.  If no file 
  3403.       extension is specified, a file extension of "obj" is assumed if you are 
  3404.       running a DOS, OS/2 or Windows-hosted version of the Watcom Linker. 
  3405.       Also, if you are running a DOS, OS/2 or Windows-hosted version of the 
  3406.       Watcom Linker, the object file specification can contain wild cards (*, 
  3407.       ?).  A file extension of "o" is assumed if you are running a QNX-hosted 
  3408.       version of the Watcom Linker. 
  3409.  
  3410.  This directive is used only in concert with incremental linking.  This 
  3411.  directive tells the linker that only the specified object files have changed. 
  3412.  When this option is specified, the linker will not check the dates on any of 
  3413.  the object files or libraries when incrementally linking. 
  3414.  
  3415.  
  3416. ΓòÉΓòÉΓòÉ 3.46. The MODTRACE Directive ΓòÉΓòÉΓòÉ
  3417.  
  3418.  
  3419. Formats:  All 
  3420.  
  3421. The "MODTRACE" directive instructs the Watcom Linker to print a list of all 
  3422. modules that reference the symbols defined in the specified modules.  The 
  3423. format of the "MODTRACE" directive (short form "MODT") is as follows. 
  3424.  
  3425.  
  3426.      MODTRACE  module_name{,module_name} 
  3427.  
  3428.  where 
  3429.       description 
  3430.  
  3431.  module_name 
  3432.       is the name of an object module defined in an object or library file. 
  3433.  
  3434.  The information is displayed in the map file.  Consider the following example. 
  3435.  
  3436.  Example: 
  3437.  
  3438.     wlink system my_os op map file test lib math modt trig 
  3439.  
  3440.  If the module "trig" defines the symbols "sin" and "cos", the Watcom Linker 
  3441.  will list, in the map file, all modules that reference the symbols "sin" and 
  3442.  "cos". 
  3443.  
  3444.  
  3445. ΓòÉΓòÉΓòÉ 3.47. The MODULE Directive ΓòÉΓòÉΓòÉ
  3446.  
  3447.  
  3448. Formats:  ELF, NetWare 
  3449.  
  3450. The "MODULE" directive is used to specify the DLLs or NLMs to be loaded before 
  3451. this executable is loaded.  The format of the "MODULE" directive (short form 
  3452. "MODU") is as follows. 
  3453.  
  3454.  
  3455.      MODULE module_name{,module_name} 
  3456.  
  3457.  where 
  3458.       description 
  3459.  
  3460.  module_name 
  3461.       is the file name of a DLL or NLM. 
  3462.  
  3463.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  3464.  
  3465.   WARNING!  Versions 3.0 and 3.1 of the NetWare 386 operating system do not 
  3466.  support the automatic loading of modules specified in the "MODULE" directive. 
  3467.  You must load them manually. 
  3468.  
  3469.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  3470.  
  3471.  
  3472. ΓòÉΓòÉΓòÉ 3.48. The MULTILOAD Option ΓòÉΓòÉΓòÉ
  3473.  
  3474.  
  3475. Formats:  NetWare 
  3476.  
  3477. The "MULTILOAD" option specifies that the module can be loaded more than once 
  3478. by a "load" command.  The format of the "MULTILOAD" option (short form 
  3479. "MULTIL") is as follows. 
  3480.  
  3481.  
  3482.      OPTION MULTILOAD 
  3483.  
  3484. If the "MULTILOAD" option is not specified, it will not be possible to load the 
  3485. module more than once using the "load" command. 
  3486.  
  3487.  
  3488. ΓòÉΓòÉΓòÉ 3.49. The NAME Directive ΓòÉΓòÉΓòÉ
  3489.  
  3490.  
  3491. Formats:  All 
  3492.  
  3493. The "NAME" directive is used to provide a name for the executable file 
  3494. generated by the Watcom Linker.  The format of the "NAME" directive (short form 
  3495. "N") is as follows. 
  3496.  
  3497.  
  3498.      NAME exe_file 
  3499.  
  3500.  where 
  3501.       description 
  3502.  
  3503.  exe_file 
  3504.       is a file specification for the name of the executable file.  Under QNX, 
  3505.       no file extension is appended.  For all other operating systems, a file 
  3506.       extension suitable for the current executable file format is appended if 
  3507.       no file extension is specified. 
  3508.  
  3509.  Consider the following example. 
  3510.  
  3511.  Example: 
  3512.  
  3513.     wlink system my_os name myprog file test, test2, test3 
  3514.  
  3515.  The linker is instructed to generate an executable file called "myprog.exe" if 
  3516.  you are running a DOS, OS/2 or Windows-hosted version of the linker.  If you 
  3517.  are running a QNX-hosted version of the linker, an executable file called 
  3518.  "myprog" will be generated. 
  3519.  
  3520.  Notes: 
  3521.  
  3522.    1. No file extension was given when the executable file name was specified. 
  3523.       The linker assumes a file extension that depends on the format of the 
  3524.       executable file being generated.  If you are running a QNX-hosted version 
  3525.       of the linker, no file extension will be assumed.  The section entitled 
  3526.       The FORMAT Directive describes the "FORMAT" directive and how the file 
  3527.       extension is chosen for each executable file format. 
  3528.  
  3529.    2. If no "NAME" directive is present, the executable file will have the file 
  3530.       name of the first object file processed by the linker.  If the first 
  3531.       object file processed is called "test.obj" and no "NAME" directive is 
  3532.       specified, an executable file called "test.exe" will be generated if you 
  3533.       are running a DOS or OS/2-hosted version of the linker.  If you are 
  3534.       running a QNX-hosted version of the linker, an executable file called 
  3535.       "test" will be generated. 
  3536.  
  3537.  
  3538. ΓòÉΓòÉΓòÉ 3.50. The NAMELEN Option ΓòÉΓòÉΓòÉ
  3539.  
  3540.  
  3541. Formats:  All 
  3542.  
  3543. The "NAMELEN" option tells the Watcom Linker that all symbols must be uniquely 
  3544. identified in the number of characters specified or less.  If any symbol fails 
  3545. to satisfy this condition, a warning message will be issued.  The warning 
  3546. message will state that a symbol has been defined more than once. 
  3547.  
  3548. The format of the "NAMELEN" option (short form "NAMEL") is as follows. 
  3549.  
  3550.  
  3551.      OPTION NAMELEN=n 
  3552.  
  3553.  where 
  3554.       description 
  3555.  
  3556.  n 
  3557.       represents a value.  The complete form of n is the following. 
  3558.  
  3559.  
  3560.          [0x]d{d}[k|m] 
  3561.  
  3562.       d represents a decimal digit.  If 0x is specified, the string of digits 
  3563.       represents a hexadecimal number.  If k is specified, the value is 
  3564.       multiplied by 1024.  If m is specified, the value is multiplied by 
  3565.       1024*1024. 
  3566.  
  3567.  Some computer systems, for example, require that all global symbols be 
  3568.  uniquely identified in 8 characters.  By specifying an appropriate value for 
  3569.  the "NAMELEN" option, you can ease the task of porting your application to 
  3570.  other computer systems. 
  3571.  
  3572.  
  3573. ΓòÉΓòÉΓòÉ 3.51. The NEWFILES Option ΓòÉΓòÉΓòÉ
  3574.  
  3575.  
  3576. Formats:  OS/2 
  3577.  
  3578. The "NEWFILES" option specifies that the application uses the high-performance 
  3579. file system.  This option is applicable to 16-bit OS/2 applications only.  The 
  3580. format of the "NEWFILES" option (short form "NEWF") is as follows. 
  3581.  
  3582.  
  3583.      OPTION NEWFILES 
  3584.  
  3585.  
  3586. ΓòÉΓòÉΓòÉ 3.52. The NEWSEGMENT Directive ΓòÉΓòÉΓòÉ
  3587.  
  3588.  
  3589. Formats:  DOS, OS/2, QNX, Win16 
  3590.  
  3591. This directive is intended for 16-bit segmented applications.  By default, the 
  3592. Watcom Linker automatically groups logical code segments into physical 
  3593. segments.  By default, these segments are 64K bytes in size.  However, the 
  3594. "PACKCODE" option can be used to specify a maximum size for all physical 
  3595. segments that is smaller than 64K bytes. 
  3596.  
  3597. The "NEWSEGMENT" directive provides an alternate method of grouping code 
  3598. segments into physical segments.  By placing this directive after a sequence of 
  3599. "FILE" directives, all code segments appearing in object modules specified by 
  3600. the sequence of "FILE" directives will be packed into a physical segment.  Note 
  3601. that the size of a physical segment may vary in size.  The format of the 
  3602. "NEWSEGMENT" directive (short form "NEW") is as follows. 
  3603.  
  3604.  
  3605.      NEWSEGMENT 
  3606.  
  3607. Consider the following example. 
  3608.  
  3609.  
  3610.    file file1, file2, file3 
  3611.    newsegment 
  3612.    file file4 
  3613.    file file5 
  3614.  
  3615. Code segments from file1, file2 and file3 will be grouped into one physical 
  3616. segment.  Code segments from file4 and file5 will be grouped into another 
  3617. physical segment. 
  3618.  
  3619. Note that code segments extracted from library files will be grouped into 
  3620. physical segments as well.  The size of these physical segments is determined 
  3621. by the "PACKCODE" option and is 64k by default. 
  3622.  
  3623.  
  3624. ΓòÉΓòÉΓòÉ 3.53. The NLMFLAGS Option ΓòÉΓòÉΓòÉ
  3625.  
  3626.  
  3627. Formats:  NetWare 
  3628.  
  3629. The "NLMFLAGS" option is used to set bits in the flags field of the header of 
  3630. the Netware executable file.  The format of the "NLMFLAGS" option (short form 
  3631. "NLMF") is as follows. 
  3632.  
  3633.  
  3634.      OPTION NLMFLAGS=some_value 
  3635.  
  3636.  where 
  3637.       description 
  3638.  
  3639.  some_value 
  3640.       is an integer value that is OR'ed into the flags field of the header of 
  3641.       the Netware executable. 
  3642.  
  3643.  
  3644. ΓòÉΓòÉΓòÉ 3.54. The NOAUTODATA Option ΓòÉΓòÉΓòÉ
  3645.  
  3646.  
  3647. Formats:  OS/2, Win16 
  3648.  
  3649. The "NOAUTODATA" option specifies that no automatic data segment (default data 
  3650. segment defined by the group "DGROUP"), exists for the program module or 
  3651. Dynamic Link Library being created.  This option applies to 16-bit applications 
  3652. only.  The format of the "NOAUTODATA" option (short form "NOA") is as follows. 
  3653.  
  3654.  
  3655.      OPTION NOAUTODATA 
  3656.  
  3657.  
  3658. ΓòÉΓòÉΓòÉ 3.55. The NODEFAULTLIBS Option ΓòÉΓòÉΓòÉ
  3659.  
  3660.  
  3661. Formats:  All 
  3662.  
  3663. Special object module records that specify default libraries are placed in 
  3664. object files generated by Watcom compilers.  These libraries reflect the memory 
  3665. and floating-point model that a source file was compiled for and are 
  3666. automatically searched by the Watcom Linker when unresolved symbols are 
  3667. detected.  These libraries can exist in the current directory, in one of the 
  3668. paths specified in "LIBPATH" directives, or in one of the paths specified in 
  3669. the LIB environment variable. 
  3670.  
  3671. Note that all library files that appear in a "LIBRARY" directive are searched 
  3672. before default libraries.  The "NODEFAULTLIBS" option instructs the Watcom 
  3673. Linker to ignore default libraries.  That is, only libraries appearing in a 
  3674. "LIBRARY" directive are searched. 
  3675.  
  3676. The format of the "NODEFAULTLIBS" option (short form "NOD") is as follows. 
  3677.  
  3678.  
  3679.      OPTION NODEFAULTLIBS 
  3680.  
  3681.  
  3682. ΓòÉΓòÉΓòÉ 3.56. The NORELOCS Option ΓòÉΓòÉΓòÉ
  3683.  
  3684.  
  3685. Formats:  QNX, Win32 
  3686.  
  3687. The "NORELOCS" option specifies that no relocation information is to be written 
  3688. to the executable file.  When the "NORELOCS" option is specified, the 
  3689. executable file can only be run in protected mode and will not run in real 
  3690. mode.  In real mode, the relocation information is required; in protected mode, 
  3691. the relocation information is not required unless your application is running 
  3692. at privilege level 0. 
  3693.  
  3694. The format of the "NORELOCS" option (short form "NOR") is as follows. 
  3695.  
  3696.  
  3697.      OPTION NORELOCS 
  3698.  
  3699.  where 
  3700.       description 
  3701.  
  3702.  NORELOCS 
  3703.       tells the Watcom Linker not to generate relocation information. 
  3704.  
  3705.  
  3706. ΓòÉΓòÉΓòÉ 3.57. The NOSTDCALL Option ΓòÉΓòÉΓòÉ
  3707.  
  3708.  
  3709. Formats:  Win32 
  3710.  
  3711. The "NOSTDCALL" option specifies that the characters unique to the __stdcall 
  3712. calling convention be trimmed from all of the symbols that are exported from 
  3713. the DLL being created.  The format of the "NOSTDCALL" option (short form 
  3714. "NOSTDC") is as follows. 
  3715.  
  3716.  
  3717.      OPTION NOSTDCALL 
  3718.  
  3719. Considering the following declarations. 
  3720.  
  3721. Example: 
  3722.  
  3723.    short PASCAL __export Function1( short var1, 
  3724.                    long varlong, 
  3725.                    short var2 ); 
  3726.  
  3727.    short PASCAL __export Function2( long varlong, 
  3728.                    short var2 ); 
  3729.  
  3730. Under ordinary circumstances, these __stdcall symbols are mapped to 
  3731. "_Function1@12" and "_Function2@8" respectively.  The "@12" and "@8" reflect 
  3732. the number of bytes in the argument list (short is passed as int).  When the 
  3733. "NOSTDCALL" option is specified, these symbols are stripped of the "_" and 
  3734. "@xx" adornments.  Thus they are exported from the DLL as "Function1" and 
  3735. "Function2". 
  3736.  
  3737. This option makes it easier to access functions exported from DLLs, especially 
  3738. when using other software languages such as FORTRAN which do not add on the 
  3739. __stdcall adornments. 
  3740.  
  3741. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  3742.  
  3743.  Note:  Use the "IMPLIB" option to create an import library for the DLL which 
  3744. can be used with software languages that add on the __stdcall adornments. 
  3745.  
  3746. ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  3747.  
  3748.  
  3749. ΓòÉΓòÉΓòÉ 3.58. The OBJALIGN Option ΓòÉΓòÉΓòÉ
  3750.  
  3751.  
  3752. Formats:  Win32 
  3753.  
  3754. The "OBJALIGN" option specifies the alignment for objects in the executable 
  3755. file.  The format of the "OBJALIGN" option (short form "OBJA") is as follows. 
  3756.  
  3757.  
  3758.      OPTION OBJALIGN=n 
  3759.  
  3760.  where 
  3761.       description 
  3762.  
  3763.  n 
  3764.       represents a value.  The complete form of n is the following. 
  3765.  
  3766.  
  3767.          [0x]d{d}[k|m] 
  3768.  
  3769.       d represents a decimal digit.  If 0x is specified, the string of digits 
  3770.       represents a hexadecimal number.  If k is specified, the value is 
  3771.       multiplied by 1024.  If m is specified, the value is multiplied by 
  3772.       1024*1024. 
  3773.  
  3774.       n must be a value that is a power of 2 and is between 512 bytes and 256 
  3775.       megabytes inclusive.  The default is 64k. 
  3776.  
  3777.  
  3778. ΓòÉΓòÉΓòÉ 3.59. The OLDLIBRARY Option ΓòÉΓòÉΓòÉ
  3779.  
  3780.  
  3781. Formats:  OS/2, Win16, Win32 
  3782.  
  3783. The "OLDLIBRARY" option is used to preserve the export ordinals for successive 
  3784. versions of a Dynamic Link Library.  This ensures that any application that 
  3785. references functions in a Dynamic Link Library by ordinal will continue to 
  3786. execute correctly.  The format of the "OLDLIBRARY" option (short form "OLD") is 
  3787. as follows. 
  3788.  
  3789.  
  3790.      OPTION OLDLIBRARY=dll_name 
  3791.  
  3792.  where 
  3793.       description 
  3794.  
  3795.  dll_name 
  3796.       is a file specification for the name of a Dynamic Link Library.  If no 
  3797.       file extension is specified, a file extension of "DLL" is assumed. 
  3798.  
  3799.  Only the current directory or a specified directory will be searched for 
  3800.  Dynamic Link Libraries specified in the "OLDLIBRARY" option. 
  3801.  
  3802.  
  3803. ΓòÉΓòÉΓòÉ 3.60. The OFFSET Option ΓòÉΓòÉΓòÉ
  3804.  
  3805.  
  3806. Formats:  OS/2, PharLap, QNX, Win32 
  3807.  
  3808. For OS/2 and Win32 applications, the "OFFSET" option specifies the preferred 
  3809. base linear address at which the executable or DLL will be loaded. 
  3810.  
  3811. For 32-bit PharLap and QNX applications, the "OFFSET" option specifies the 
  3812. offset in the program's segment in which the first byte of code or data is 
  3813. loaded. 
  3814.  
  3815.  
  3816. ΓòÉΓòÉΓòÉ 3.60.1. OFFSET - OS/2, Win32 only ΓòÉΓòÉΓòÉ
  3817.  
  3818.  
  3819. The "OFFSET" option specifies the preferred base linear address at which the 
  3820. executable or DLL will be loaded.  The Watcom Linker will relocate the 
  3821. application for the specified base linear address so that when it is loaded by 
  3822. the operating system, no relocation will be required.  This decreases the load 
  3823. time of the application. 
  3824.  
  3825. If the operating system is unable to load the application at the specified base 
  3826. linear address, it will load it at a different location which will increase the 
  3827. load time since a relocation phase must be performed. 
  3828.  
  3829. The format of the "OFFSET" option (short form "OFF") is as follows. 
  3830.  
  3831.  
  3832.      OPTION OFFSET=n 
  3833.  
  3834.  where 
  3835.       description 
  3836.  
  3837.  n 
  3838.       represents a value.  The complete form of n is the following. 
  3839.  
  3840.  
  3841.          [0x]d{d}[k|m] 
  3842.  
  3843.       d represents a decimal digit.  If 0x is specified, the string of digits 
  3844.       represents a hexadecimal number.  If k is specified, the value is 
  3845.       multiplied by 1024.  If m is specified, the value is multiplied by 
  3846.       1024*1024. 
  3847.  
  3848.  The "OFFSET" option is used to specify the base linear address (in bytes) at 
  3849.  which the program is loaded and must be a multiple of 64K.  The linker will 
  3850.  round the value up to a multiple of 64K if it is not already a multiple of 
  3851.  64K.  The default base linear address is 64K for OS/2 executables and 4096K 
  3852.  for Win32 executables. 
  3853.  
  3854.  This option is most useful for improving the load time of DLLs, especially for 
  3855.  an application that uses multiple DLLs. 
  3856.  
  3857.  
  3858. ΓòÉΓòÉΓòÉ 3.60.2. OFFSET - PharLap only ΓòÉΓòÉΓòÉ
  3859.  
  3860.  
  3861. The "OFFSET" option specifies the offset in the program's segment in which the 
  3862. first byte of code or data is loaded.  The format of the "OFFSET" option (short 
  3863. form "OFF") is as follows. 
  3864.  
  3865.  
  3866.      OPTION OFFSET=n 
  3867.  
  3868.  where 
  3869.       description 
  3870.  
  3871.  n 
  3872.       represents a value.  The complete form of n is the following. 
  3873.  
  3874.  
  3875.          [0x]d{d}[k|m] 
  3876.  
  3877.       d represents a decimal digit.  If 0x is specified, the string of digits 
  3878.       represents a hexadecimal number.  If k is specified, the value is 
  3879.       multiplied by 1024.  If m is specified, the value is multiplied by 
  3880.       1024*1024. 
  3881.  
  3882.  n specifies the offset (in bytes) at which the program is loaded and must be a 
  3883.  multiple of 4K.  The Watcom Linker will round the value up to a multiple of 4K 
  3884.  if it is not already a multiple of 4K. 
  3885.  
  3886.  It is possible to detect NULL pointer references by linking the program at an 
  3887.  offset which is a multiple of 4K.  Usually an offset of 4K is sufficient. 
  3888.  
  3889.  Example: 
  3890.  
  3891.     option offset=4k 
  3892.  
  3893.  When the program is loaded by 386|DOS-Extender, the pages skipped by the 
  3894.  "OFFSET" option are not mapped.  Any reference to an unmapped area (such as a 
  3895.  NULL pointer) will cause a page fault preventing the NULL reference from 
  3896.  corrupting the program. 
  3897.  
  3898.  
  3899. ΓòÉΓòÉΓòÉ 3.60.3. OFFSET - QNX only ΓòÉΓòÉΓòÉ
  3900.  
  3901.  
  3902. The "OFFSET" option specifies the offset in the program's segment in which the 
  3903. first byte of code or data is loaded.  This option does not apply to 16-bit QNX 
  3904. applications.  The format of the "OFFSET" option (short form "OFF") is as 
  3905. follows. 
  3906.  
  3907.  
  3908.      OPTION OFFSET=n 
  3909.  
  3910.  where 
  3911.       description 
  3912.  
  3913.  n 
  3914.       represents a value.  The complete form of n is the following. 
  3915.  
  3916.  
  3917.          [0x]d{d}[k|m] 
  3918.  
  3919.       d represents a decimal digit.  If 0x is specified, the string of digits 
  3920.       represents a hexadecimal number.  If k is specified, the value is 
  3921.       multiplied by 1024.  If m is specified, the value is multiplied by 
  3922.       1024*1024. 
  3923.  
  3924.  n specifies the offset (in bytes) at which the program is loaded and must be a 
  3925.  multiple of 4K.  The Watcom Linker will round the value up to a multiple of 4K 
  3926.  if it is not already a multiple of 4K.  The following describes a use of the 
  3927.  "OFFSET" option. 
  3928.  
  3929.  It is possible to detect NULL pointer references by linking the program at an 
  3930.  offset which is a multiple of 4K.  Usually an offset of 4K is sufficient. 
  3931.  
  3932.  Example: 
  3933.  
  3934.     option offset=4k 
  3935.  
  3936.  When the program is loaded, the pages skipped by the "OFFSET" option are not 
  3937.  mapped.  Any reference to an unmapped area (such as a NULL pointer) will cause 
  3938.  a page fault preventing the NULL reference from corrupting the program. 
  3939.  
  3940.  
  3941. ΓòÉΓòÉΓòÉ 3.61. The ONEAUTODATA Option ΓòÉΓòÉΓòÉ
  3942.  
  3943.  
  3944. Formats:  OS/2, Win16 
  3945.  
  3946. The "ONEAUTODATA" option specifies that the automatic data segment (default 
  3947. data segment defined by the group "DGROUP"), for the program module or Dynamic 
  3948. Link Library (DLL) being created, will be shared by all instances.  The format 
  3949. of the "ONEAUTODATA" option (short form "ONE") is as follows. 
  3950.  
  3951.  
  3952.      OPTION ONEAUTODATA 
  3953.  
  3954. The default for a Dynamic Link Library is "ONEAUTODATA" and for a program 
  3955. module is "MANYAUTODATA".  If you do not want the data area of a DLL to be 
  3956. shared across multiple applications, then you should specify "OPTION 
  3957. MANYAUTODATA". 
  3958.  
  3959.  Win16: 
  3960.       Note, however, that this attribute is not supported by Windows 3.x for 
  3961.       16-bit DLLs. 
  3962.  
  3963.  You should also see the related section entitled The FORMAT Directive for 
  3964.  information on the "INITINSTANCE", "TERMINSTANCE", "INITGLOBAL", and 
  3965.  "TERMGLOBAL" DLL attributes. 
  3966.  
  3967.  
  3968. ΓòÉΓòÉΓòÉ 3.62. The OPTION Directive ΓòÉΓòÉΓòÉ
  3969.  
  3970.  
  3971. Formats:  All 
  3972.  
  3973. The "OPTION" directive is used to specify options to the Watcom Linker.  The 
  3974. format of the "OPTION" directive (short form "OP") is as follows. 
  3975.  
  3976.  
  3977.      OPTION option{,option} 
  3978.  
  3979.  where 
  3980.       description 
  3981.  
  3982.  option 
  3983.       is any of the linker options available for the executable format that is 
  3984.       being generated. 
  3985.  
  3986.  
  3987. ΓòÉΓòÉΓòÉ 3.63. The OPTLIB Directive ΓòÉΓòÉΓòÉ
  3988.  
  3989.  
  3990. Formats:  All 
  3991.  
  3992. The "OPTLIB" directive is used to specify the library files to be searched when 
  3993. unresolved symbols remain after processing all specified input object files. 
  3994. The format of the "OPTLIB" directive (no short form) is as follows. 
  3995.  
  3996.  
  3997.      OPTLIB library_file{,library_file} 
  3998.  
  3999.  where 
  4000.       description 
  4001.  
  4002.  library_file 
  4003.       is a file specification for the name of a library file.  If no file 
  4004.       extension is specified, a file extension of "lib" is assumed. 
  4005.  
  4006.  This directive is similar to the "LIBRARY" directive except that the linker 
  4007.  will not issue a warning message if the library file cannot be found. 
  4008.  
  4009.  Consider the following example. 
  4010.  
  4011.  Example: 
  4012.  
  4013.     wlink system my_os file trig optlib \math\trig, \cmplx\trig 
  4014.  
  4015.  The Watcom Linker is instructed to process the following object file: 
  4016.  
  4017.  
  4018.     trig.obj 
  4019.  
  4020.  If any unresolved symbol references remain after all object files have been 
  4021.  processed, the following library files will be searched: 
  4022.  
  4023.  
  4024.     \math\trig.lib 
  4025.     \cmplx\trig.lib 
  4026.  
  4027.  More than one "OPTLIB" directive may be used.  The following example is 
  4028.  equivalent to the preceding one. 
  4029.  
  4030.  Example: 
  4031.  
  4032.     wlink system my_os f trig optlib \math\trig optlib \cmplx\trig 
  4033.  
  4034.  Thus other directives may be placed between lists of library files. 
  4035.  
  4036.  
  4037. ΓòÉΓòÉΓòÉ 3.63.1. Searching for Optional Libraries Specified in Environment Variables ΓòÉΓòÉΓòÉ
  4038.  
  4039.  
  4040. The "LIB" environment variable can be used to specify a list of paths that will 
  4041. be searched for library files.  The "LIB" environment variable can be set using 
  4042. the "set" command as follows: 
  4043.  
  4044.  
  4045.    set lib=\graphics\lib;\utility 
  4046.  
  4047. Consider the following "OPTLIB" directive and the above definition of the "LIB" 
  4048. environment variable. 
  4049.  
  4050.  
  4051.    optlib \mylibs\util, graph 
  4052.  
  4053. If undefined symbols remain after processing all object files specified in all 
  4054. "FILE" directives, the Watcom Linker will resolve these references by searching 
  4055. the following libraries in the specified order. 
  4056.  
  4057.    1. the library file "\mylibs\util.lib" 
  4058.  
  4059.    2. the library file "graph.lib" in the current directory 
  4060.  
  4061.    3. the library file "\graphics\lib\graph.lib" 
  4062.  
  4063.    4. the library file "\utility\graph.lib" 
  4064.  
  4065.  Notes: 
  4066.  
  4067.    1. If a library file specified in a "OPTLIB" directive contains an absolute 
  4068.       path specification, the Watcom Linker will not search any of the paths 
  4069.       specified in the "LIB" environment string for the library file.  On 
  4070.       QNX-hosted systems, an absolute path specification is one that begins the 
  4071.       "/" character.  On all other hosts, an absolute path specification is one 
  4072.       that begins with a drive specification or the "\" character. 
  4073.  
  4074.    2. Once a library file has been found, no further elements of the "LIB" 
  4075.       environment variable are searched for other libraries of the same name. 
  4076.       That is, if the library file "\graphics\lib\graph.lib" exists, the 
  4077.       library file "\utility\graph.lib" will not be searched even though 
  4078.       unresolved references may remain. 
  4079.  
  4080.  
  4081. ΓòÉΓòÉΓòÉ 3.64. The OSDOMAIN Option ΓòÉΓòÉΓòÉ
  4082.  
  4083.  
  4084. Formats:  NetWare 
  4085.  
  4086. The "OSDOMAIN" option is used when the application is to run in the operating 
  4087. system domain (ring 0). 
  4088.  
  4089. The format of the "OSDOMAIN" option (short form "OSD") is as follows. 
  4090.  
  4091.  
  4092.      OPTION OSDOMAIN 
  4093.  
  4094.  
  4095. ΓòÉΓòÉΓòÉ 3.65. The PSEUDOPREEMPTION Option ΓòÉΓòÉΓòÉ
  4096.  
  4097.  
  4098. Formats:  NetWare 
  4099.  
  4100. The "PSEUDOPREEMPTION" option specifies that an additional set of system calls 
  4101. will yield control to other processes.  Multitasking in the NetWare 386 
  4102. operating system is non-preemptive.  That is, a process must give up control in 
  4103. order for other processes to execute.  Using the "PSEUDOPREEMPTION" option 
  4104. increases the probability that all processes are given an equal amount of CPU 
  4105. time. 
  4106.  
  4107. The format of the "PSEUDOPREEMPTION" option (short form "PS") is as follows. 
  4108.  
  4109.  
  4110.      OPTION PSEUDOPREEMPTION 
  4111.  
  4112.  
  4113. ΓòÉΓòÉΓòÉ 3.66. The OSNAME Option ΓòÉΓòÉΓòÉ
  4114.  
  4115.  
  4116. Formats:  All 
  4117.  
  4118. The "OSNAME" option can be used to set the name of the target operating system 
  4119. of the executable file generated by the linker.  The format of the "OSNAME" 
  4120. option (short form "OSN") is as follows. 
  4121.  
  4122.  
  4123.      OPTION OSNAME='string' 
  4124.  
  4125.  where 
  4126.       description 
  4127.  
  4128.  string 
  4129.       is any sequence of characters. 
  4130.  
  4131.  The information specified by the "OSNAME" option will be displayed in the 
  4132.  creating a ?  executable message.  This is the last line of output produced by 
  4133.  the linker, provided the "QUIET" option is not specified.  Consider the 
  4134.  following example. 
  4135.  
  4136.  
  4137.     option osname='SuperOS' 
  4138.  
  4139.  The last line of output produced by the linker will be as follows. 
  4140.  
  4141.  
  4142.     creating a SuperOS executable 
  4143.  
  4144.  Some executable formats have a stub executable file that is run under 16-bit 
  4145.  DOS.  The message displayed by the default stub executable file will be 
  4146.  modified when the "OSNAME" option is used.  The default stub executable 
  4147.  displays the following message: 
  4148.  
  4149.  OS/2: 
  4150.        this is an OS/2 executable 
  4151.  
  4152.  Win16: 
  4153.        this is a Windows executable 
  4154.  
  4155.  Win32: 
  4156.        this is a Windows NT executable 
  4157.  
  4158.  If the "OSNAME" option used in the previous example was specified, the default 
  4159.  stub executable would generate the following message. 
  4160.  
  4161.  
  4162.     this is a SuperOS executable 
  4163.  
  4164.  
  4165. ΓòÉΓòÉΓòÉ 3.67. The PACKCODE Option ΓòÉΓòÉΓòÉ
  4166.  
  4167.  
  4168. Formats:  DOS, OS/2, QNX, Win16 
  4169.  
  4170. This option is intended for 16-bit segmented applications.  By default, the 
  4171. Watcom Linker automatically groups logical code segments into physical 
  4172. segments.  The "PACKCODE" option is used to specify the size of the physical 
  4173. segment.  The format of the "PACKCODE" option (short form "PACKC") is as 
  4174. follows. 
  4175.  
  4176.  
  4177.      OPTION PACKCODE=n 
  4178.  
  4179.  where 
  4180.       description 
  4181.  
  4182.  n 
  4183.       represents a value.  The complete form of n is the following. 
  4184.  
  4185.  
  4186.          [0x]d{d}[k|m] 
  4187.  
  4188.       d represents a decimal digit.  If 0x is specified, the string of digits 
  4189.       represents a hexadecimal number.  If k is specified, the value is 
  4190.       multiplied by 1024.  If m is specified, the value is multiplied by 
  4191.       1024*1024. 
  4192.  
  4193.  n specifies the size of the physical segments into which code segments are 
  4194.  packed.  The default value of n is 64K for 16-bit applications.  Note that 
  4195.  this is also the maximum size of a physical segment. To suppress automatic 
  4196.  grouping of code segments, specify a value of 0 for n. 
  4197.  
  4198.  Notes: 
  4199.  
  4200.    1. Only adjacent segments are packed into a physical segment. 
  4201.  
  4202.    2. Segments belonging to the same group are packed in a physical segment. 
  4203.       Segments belonging to different groups are not packed into a physical 
  4204.       segment. 
  4205.  
  4206.    3. Segments with different attributes are not packed together unless they 
  4207.       are explicitly grouped. 
  4208.  
  4209.  
  4210. ΓòÉΓòÉΓòÉ 3.68. The PACKDATA Option ΓòÉΓòÉΓòÉ
  4211.  
  4212.  
  4213. Formats:  DOS, OS/2, QNX, Win16 
  4214.  
  4215. This option is intended for 16-bit segmented applications.  By default, the 
  4216. Watcom Linker automatically groups logical far data segments into physical 
  4217. segments.  The "PACKDATA" option is used to specify the size of the physical 
  4218. segment.  The format of the "PACKDATA" option (short form "PACKD") is as 
  4219. follows. 
  4220.  
  4221.  
  4222.      OPTION PACKDATA=n 
  4223.  
  4224.  where 
  4225.       description 
  4226.  
  4227.  n 
  4228.       represents a value.  The complete form of n is the following. 
  4229.  
  4230.  
  4231.          [0x]d{d}[k|m] 
  4232.  
  4233.       d represents a decimal digit.  If 0x is specified, the string of digits 
  4234.       represents a hexadecimal number.  If k is specified, the value is 
  4235.       multiplied by 1024.  If m is specified, the value is multiplied by 
  4236.       1024*1024. 
  4237.  
  4238.  n specifies the size of the physical segments into which far data segments are 
  4239.  packed.  The default value of n is 64K for 16-bit applications.  Note that 
  4240.  this is also the maximum size of a physical segment. To suppress automatic 
  4241.  grouping of far data segments, specify a value of 0 for n. 
  4242.  
  4243.  Notes: 
  4244.  
  4245.    1. Only adjacent segments are packed into a physical segment. 
  4246.  
  4247.    2. Segments belonging to the same group are packed in a physical segment. 
  4248.       Segments belonging to different groups are not packed into a physical 
  4249.       segment. 
  4250.  
  4251.    3. Segments with different attributes are not packed together unless they 
  4252.       are explicitly grouped. 
  4253.  
  4254.  
  4255. ΓòÉΓòÉΓòÉ 3.69. The PATH Directive ΓòÉΓòÉΓòÉ
  4256.  
  4257.  
  4258. Formats:  All 
  4259.  
  4260. The "PATH" directive is used to specify the directories that are to be searched 
  4261. for object files appearing in subsequent "FILE" directives.  When the "PATH" 
  4262. directive is specified, the current directory will no longer be searched unless 
  4263. it appears in the "PATH" directive.  The format of the "PATH" directive (short 
  4264. form "P") is as follows. 
  4265.  
  4266.  
  4267.      PATH path_name{;path_name} 
  4268.  
  4269.  where 
  4270.       description 
  4271.  
  4272.  path_name 
  4273.       is a path name. 
  4274.  
  4275.  Consider a directive file containing the following linker directives. 
  4276.  
  4277.  
  4278.     path \math 
  4279.     file sin 
  4280.     path \stats 
  4281.     file mean, variance 
  4282.  
  4283.  It instructs the Watcom Linker to process the following object files: 
  4284.  
  4285.  
  4286.     \math\sin.obj 
  4287.     \stats\mean.obj 
  4288.     \stats\variance.obj 
  4289.  
  4290.  It is also possible to specify a list of paths in a "PATH" directive. 
  4291.  Consider the following example. 
  4292.  
  4293.  
  4294.     path \math;\stats 
  4295.     file sin 
  4296.  
  4297.  First, the linker will attempt to load the file "\math\sin.obj".  If 
  4298.  unsuccessful, the linker will attempt to load the file "\stats\sin.obj". 
  4299.  
  4300.  It is possible to override the path specified in a "PATH" directive by 
  4301.  preceding the object file name in a "FILE" directive with an absolute path 
  4302.  specification.  On QNX-hosted systems, an absolute path specification is one 
  4303.  that begins the "/" character.  On all other hosts, an absolute path 
  4304.  specification is one that begins with a drive specification or the "\" 
  4305.  character. 
  4306.  
  4307.  
  4308.     path \math 
  4309.     file sin 
  4310.     path \stats 
  4311.     file mean, \mydir\variance 
  4312.  
  4313.  The above directive file instructs the linker to process the following object 
  4314.  files: 
  4315.  
  4316.  
  4317.     \math\sin.obj 
  4318.     \stats\mean.obj 
  4319.     \mydir\variance.obj 
  4320.  
  4321.  
  4322. ΓòÉΓòÉΓòÉ 3.70. The PRIVILEGE Option ΓòÉΓòÉΓòÉ
  4323.  
  4324.  
  4325. Formats:  QNX 
  4326.  
  4327. The "PRIVILEGE" option specifies the privilege level (0, 1, 2 or 3) at which 
  4328. the application will run.  The format of the "PRIVILEGE" option (short form 
  4329. "PRIV") is as follows. 
  4330.  
  4331.  
  4332.      OPTION PRIVILEGE=n 
  4333.  
  4334.  where 
  4335.       description 
  4336.  
  4337.  n 
  4338.       represents a value.  The complete form of n is the following. 
  4339.  
  4340.  
  4341.          [0x]d{d}[k|m] 
  4342.  
  4343.       d represents a decimal digit.  If 0x is specified, the string of digits 
  4344.       represents a hexadecimal number.  If k is specified, the value is 
  4345.       multiplied by 1024.  If m is specified, the value is multiplied by 
  4346.       1024*1024. 
  4347.  
  4348.  The default privilege level is 0. 
  4349.  
  4350.  
  4351. ΓòÉΓòÉΓòÉ 3.71. The PROTMODE Option ΓòÉΓòÉΓòÉ
  4352.  
  4353.  
  4354. Formats:  OS/2 
  4355.  
  4356. The "PROTMODE" option specifies that the application will only run in protected 
  4357. mode.  This option applies to 16-bit OS/2 applications only.  The format of the 
  4358. "PROTMODE" option (short form "PROT") is as follows. 
  4359.  
  4360.  
  4361.      OPTION PROTMODE 
  4362.  
  4363.  
  4364. ΓòÉΓòÉΓòÉ 3.72. The QUIET Option ΓòÉΓòÉΓòÉ
  4365.  
  4366.  
  4367. Formats:  All 
  4368.  
  4369. The "QUIET" option tells the Watcom Linker to suppress all informational 
  4370. messages.  Only warning, error and fatal messages will be issued.  By default, 
  4371. the Watcom Linker issues informational messages.  The format of the "QUIET" 
  4372. option (short form "Q") is as follows. 
  4373.  
  4374.  
  4375.      OPTION QUIET 
  4376.  
  4377.  
  4378. ΓòÉΓòÉΓòÉ 3.73. The REDEFSOK Option ΓòÉΓòÉΓòÉ
  4379.  
  4380.  
  4381. Formats:  All 
  4382.  
  4383. The "REDEFSOK" option tells the Watcom Linker to ignore redefined symbols and 
  4384. to generate an executable file anyway.  By default, warning messages are 
  4385. displayed and an executable file is generated if redefined symbols are present. 
  4386.  
  4387. The format of the "REDEFSOK" option (short form "RED") is as follows. 
  4388.  
  4389.  
  4390.      OPTION REDEFSOK 
  4391.  
  4392. The "NOREDEFSOK" option tells the Watcom Linker to treat redefined symbols as 
  4393. an error and to not generate an executable file.  By default, warning messages 
  4394. are displayed and an executable file is generated if redefined symbols are 
  4395. present. 
  4396.  
  4397. The format of the "NOREDEFSOK" option (short form "NORED") is as follows. 
  4398.  
  4399.  
  4400.      OPTION NOREDEFSOK 
  4401.  
  4402.  
  4403. ΓòÉΓòÉΓòÉ 3.74. The REENTRANT Option ΓòÉΓòÉΓòÉ
  4404.  
  4405.  
  4406. Formats:  NetWare 
  4407.  
  4408. The "REENTRANT" option specifies that the module is reentrant.  That is, if an 
  4409. NLM is LOADed twice, the actual code in the server's memory is reused.  The 
  4410. NLM's start procedure is called once for each LOAD.  The format of the 
  4411. "REENTRANT" option (short form "RE") is as follows. 
  4412.  
  4413.  
  4414.      OPTION REENTRANT 
  4415.  
  4416.  
  4417. ΓòÉΓòÉΓòÉ 3.75. The REFERENCE Directive ΓòÉΓòÉΓòÉ
  4418.  
  4419.  
  4420. Formats:  All 
  4421.  
  4422. The "REFERENCE" directive is used to explicitly reference a symbol that is not 
  4423. referenced by any object file processed by the linker.  If any symbol appearing 
  4424. in a "REFERENCE" directive is not resolved by the linker, an error message will 
  4425. be issued for that symbol specifying that the symbol is undefined. 
  4426.  
  4427. The "REFERENCE" directive can be used to force object files from libraries to 
  4428. be linked with the application.  Also note that a symbol appearing in a 
  4429. "REFERENCE" directive will not be eliminated by dead code elimination.  For 
  4430. more information on dead code elimination, see the section entitled The 
  4431. ELIMINATE Option. 
  4432.  
  4433. The format of the "REFERENCE" directive (short form "REF") is as follows. 
  4434.  
  4435.  
  4436.      REFERENCE symbol_name{, symbol_name} 
  4437.  
  4438.  where 
  4439.       description 
  4440.  
  4441.  symbol_name 
  4442.       is the symbol for which a reference is made. 
  4443.  
  4444.  Consider the following example. 
  4445.  
  4446.  
  4447.     reference domino 
  4448.  
  4449.  The symbol domino will be searched for.  The object module that defines this 
  4450.  symbol will be linked with the application.  Note that the linker will also 
  4451.  attempt to resolve symbols referenced by this module. 
  4452.  
  4453.  
  4454. ΓòÉΓòÉΓòÉ 3.76. The RESOURCE Option ΓòÉΓòÉΓòÉ
  4455.  
  4456.  
  4457. Formats:  OS/2, QNX, Win16, Win32 
  4458.  
  4459. For 16-bit OS/2 executable files and Win16 or Win32 executable files, the 
  4460. "RESOURCE" option requests the linker to add the specified resource file to the 
  4461. executable file being generated.  For QNX executable files, the "RESOURCE" 
  4462. option specifies the contents of the resource record. 
  4463.  
  4464.  
  4465. ΓòÉΓòÉΓòÉ 3.76.1. RESOURCE - OS/2, Win16, Win32 only ΓòÉΓòÉΓòÉ
  4466.  
  4467.  
  4468. The "RESOURCE" option requests the linker to add the specified resource file to 
  4469. the executable file that is being generated.  The format of the "RESOURCE" 
  4470. option (short form "RES") is as follows. 
  4471.  
  4472.  
  4473.      OPTION RESOURCE[=resource_file] 
  4474.  
  4475.  where 
  4476.       description 
  4477.  
  4478.  resource_file 
  4479.       is a file specification for the name of the resource file that is to be 
  4480.       added to the executable file.  If no file extension is specified, a file 
  4481.       extension of "RES" is assumed for all but QNX format executables. 
  4482.  
  4483.  The "RESOURCE" option cannot be used for 32-bit OS/2 executables. 
  4484.  
  4485.  
  4486. ΓòÉΓòÉΓòÉ 3.76.2. RESOURCE - QNX only ΓòÉΓòÉΓòÉ
  4487.  
  4488.  
  4489. The "RESOURCE" option specifies the contents of the resource record in QNX 
  4490. executable files.  The format of the "RESOURCE" option (short form "RES") is as 
  4491. follows. 
  4492.  
  4493.  
  4494.      OPTION RESOURCE resource_info 
  4495.  
  4496.      resource_info ::= 'string' | =resource_file 
  4497.  
  4498.  where 
  4499.       description 
  4500.  
  4501.  resource_file 
  4502.       is a file specification for the name of the resource file.  No file 
  4503.       extension is assumed. 
  4504.  
  4505.  string 
  4506.       is a sequence of characters which is placed in the resource record. 
  4507.  
  4508.  If a resource file is specified, the contents of the resource file are 
  4509.  included in the resource record. 
  4510.  
  4511.  The resource record contains, for example, help information and is displayed 
  4512.  when the following command is executed. 
  4513.  
  4514.  
  4515.     use <executable> 
  4516.  
  4517.  QNX also provides the usemsg utility to manipulate the resource record of an 
  4518.  executable file.  Its use is recommended.  This utility is described in the 
  4519.  QNX "Utilities Reference" manual. 
  4520.  
  4521.  
  4522. ΓòÉΓòÉΓòÉ 3.77. The RUNTIME Directive ΓòÉΓòÉΓòÉ
  4523.  
  4524.  
  4525. Formats:  PharLap, Win32 
  4526.  
  4527. For Win32 applications, the "RUNTIME" directive specifies the environment under 
  4528. which the application will run. 
  4529.  
  4530. For PharLap applications, the "RUNTIME" directive describes information that is 
  4531. used by 386|DOS-Extender to setup the environment for execution of the program. 
  4532.  
  4533.  
  4534. ΓòÉΓòÉΓòÉ 3.77.1. RUNTIME - Win32 only ΓòÉΓòÉΓòÉ
  4535.  
  4536.  
  4537. The "RUNTIME" directive specifies the environment under which the application 
  4538. will run.  The format of the "RUNTIME" directive (short form "RU") is as 
  4539. follows. 
  4540.  
  4541.  
  4542.      RUNTIME  env[=major[.minor]] 
  4543.  
  4544.      env ::= NATIVE | WINDOWS | CONSOLE | POSIX | OS2 | DOSSTYLE 
  4545.  
  4546.  where 
  4547.       description 
  4548.  
  4549.  env=major.minor 
  4550.       Specifying a system version in the form "major" or "major.minor" 
  4551.       indicates the minimum operating system version required for the 
  4552.       application.  For example, the following indicates that the application 
  4553.       requires Windows 95. 
  4554.  
  4555.  
  4556.          runtime windows=4.0 
  4557.  
  4558.  NATIVE 
  4559.       (short form "NAT") indicates that the application is a native Windows NT 
  4560.       application. 
  4561.  
  4562.  WINDOWS 
  4563.       (short form "WIN") indicates that the application is a Windows 
  4564.       application. 
  4565.  
  4566.  CONSOLE 
  4567.       (short form "CON") indicates that the application is a character-mode 
  4568.       (command line oriented) application. 
  4569.  
  4570.  POSIX 
  4571.       (short form "POS") indicates that the application uses the POSIX 
  4572.       subsystem available with Windows NT. 
  4573.  
  4574.  OS2 
  4575.       indicates that the application is a 16-bit OS/2 1.x application. 
  4576.  
  4577.  DOSSTYLE 
  4578.       (short form "DOS") indicates that the application is a Phar Lap TNT DOS 
  4579.       extender application that uses INT 21 to communicate to the DOS extender 
  4580.       rather than calls to a DLL. 
  4581.  
  4582.  
  4583. ΓòÉΓòÉΓòÉ 3.77.2. RUNTIME - PharLap only ΓòÉΓòÉΓòÉ
  4584.  
  4585.  
  4586. The "RUNTIME" directive describes information that is used by 386|DOS-Extender 
  4587. to setup the environment for execution of the program.  The format of the 
  4588. "RUNTIME" directive (short form "RU") is as follows. 
  4589.  
  4590.  
  4591.      RUNTIME run_option{,run_option} 
  4592.  
  4593.      run_option ::= MINREAL=n | MAXREAL=n | CALLBUFS=n | MINIBuf=n 
  4594.                 | MAXIBUF=n | NISTACK=n | ISTKSIZE=n 
  4595.                 | REALBREAK=offset | PRIVILEGED | UNPRIVILEGED 
  4596.  
  4597.      offset ::= n | symbol_name 
  4598.  
  4599.  where 
  4600.       description 
  4601.  
  4602.  n 
  4603.       represents a value.  The complete form of n is the following. 
  4604.  
  4605.  
  4606.          [0x]d{d}[k|m] 
  4607.  
  4608.       d represents a decimal digit.  If 0x is specified, the string of digits 
  4609.       represents a hexadecimal number.  If k is specified, the value is 
  4610.       multiplied by 1024.  If m is specified, the value is multiplied by 
  4611.       1024*1024. 
  4612.  
  4613.  symbol_name 
  4614.       is a symbol name. 
  4615.  
  4616.  MINREAL 
  4617.       (short form "MINR") specifies the minimum number of bytes of conventional 
  4618.       memory required to be free after a program is loaded by 386|DOS-Extender. 
  4619.       Note that this memory is no longer available to the executing program. 
  4620.       The default value of n is 0 in which case 386|DOS-Extender allocates all 
  4621.       conventional memory for the executing program.  The Watcom Linker 
  4622.       truncates the specified value to a multiple of 16.  n must be less than 
  4623.       or equal to hexadecimal 100000 (64K*16). 
  4624.  
  4625.  MAXREAL 
  4626.       (short form "MAXR") specifies the maximum number of bytes of conventional 
  4627.       memory than can be left free after a program is loaded by 
  4628.       386|DOS-Extender.  Note that this memory is not available to the 
  4629.       executing program.  The default value of n is 0 in which case 
  4630.       386|DOS-Extender allocates all conventional memory for the executing 
  4631.       program.  n must be less than or equal to hexadecimal ffff0.  The Watcom 
  4632.       Linker truncates the specified value to a multiple of 16. 
  4633.  
  4634.  CALLBUFS 
  4635.       (short form "CALLB") specifies the size of the call buffer allocated for 
  4636.       switching between 32-bit protected mode and real mode.  This buffer is 
  4637.       used for communicating information between real-mode and 32-bit 
  4638.       protected-mode procedures.  The buffer address is obtained at run-time 
  4639.       with a 386|DOS-Extender system call.  The size returned is the size of 
  4640.       the buffer in kilobytes and is less than or equal to 64. 
  4641.  
  4642.       The default buffer size is zero unless changed using the "CALLBUFS" 
  4643.       option.  The Watcom Linker truncates the specified value to a multiple of 
  4644.       1024.  n must be less than or equal to 64K.  Note that n is the number of 
  4645.       bytes, not kilobytes. 
  4646.  
  4647.  MINIBUF 
  4648.       (short form "MINIB") specifies the minimum size of the data buffer that 
  4649.       is used when DOS and BIOS functions are called.  The size of this buffer 
  4650.       is particularly important for file I/O.  If your program reads or writes 
  4651.       large amounts of data, a large value of n should be specified.  n 
  4652.       represents the number of bytes and must be less than or equal to 64K. 
  4653.       The default value of n is 1K.  The Watcom Linker truncates the specified 
  4654.       value to a multiple of 1024. 
  4655.  
  4656.  MAXIBUF 
  4657.       (short form "MAXIB") specifies the maximum size of the data buffer that 
  4658.       is used when DOS and BIOS functions are called.  The size of this buffer 
  4659.       is particularly important for file I/O.  If your program reads or writes 
  4660.       large amounts of data, a large value of n should be specified.  n 
  4661.       represents the number of bytes and must be less than or equal to 64K. 
  4662.       The default value of n is 4K.  The Watcom Linker truncates the specified 
  4663.       value to a multiple of 1024. 
  4664.  
  4665.  NISTACK 
  4666.       (short form "NIST") specifies the number of stack buffers to be allocated 
  4667.       for use by 386|DOS-Extender when switching from 32-bit protected mode to 
  4668.       real mode.  By default, 4 stack buffers are allocated.  n must be greater 
  4669.       than or equal to 4. 
  4670.  
  4671.  ISTKSIZE 
  4672.       (short form "ISTK") specifies the size of the stack buffers allocated for 
  4673.       use by 386|DOS-Extender when switching from 32-bit protected mode to real 
  4674.       mode.  By default, the size of a stack buffer is 1K.  The value of n must 
  4675.       be greater than or equal to 1K and less than or equal to 64K.  The Watcom 
  4676.       Linker truncates the specified value to a multiple of 1024. 
  4677.  
  4678.  REALBREAK 
  4679.       (short form "REALB") specifies how much of the program must be loaded 
  4680.       into conventional memory so that it can be accessed and/or executed in 
  4681.       real mode.  If n is specified, the first n bytes of the program must be 
  4682.       loaded into conventional memory.  If symbol is specified, all bytes up to 
  4683.       but not including the symbol must be loaded into conventional memory. 
  4684.  
  4685.  PRIVILEGED 
  4686.       (short form "PRIV") specifies that the executable is to run at Ring 0 
  4687.       privilege level. 
  4688.  
  4689.  UNPRIVILEGED 
  4690.       (short form "UNPRIV") specifies that the executable is to run at Ring 3 
  4691.       privilege level (i.e., unprivileged).  This is the default privilege 
  4692.       level. 
  4693.  
  4694.  
  4695. ΓòÉΓòÉΓòÉ 3.78. The RWRELOCCHECK Option ΓòÉΓòÉΓòÉ
  4696.  
  4697.  
  4698. Formats:  Win16 
  4699.  
  4700. The "RWRELOCCHECK" option causes the linker to check for segment relocations to 
  4701. a read/write data segment and issue a warning if any are found.  This option is 
  4702. useful if you are building a 16-bit Windows application that may have more than 
  4703. one instance running at a given time. 
  4704.  
  4705. The format of the "RWRELOCCHECK" option (short form "RWR") is as follows. 
  4706.  
  4707.  
  4708.      OPTION RWRELOCCHECK 
  4709.  
  4710.  
  4711. ΓòÉΓòÉΓòÉ 3.79. The SCREENNAME Option ΓòÉΓòÉΓòÉ
  4712.  
  4713.  
  4714. Formats:  NetWare 
  4715.  
  4716. The "SCREENNAME" option specifies the name of the first screen (the screen that 
  4717. is automatically created when an NLM is loaded).  The format of the 
  4718. "SCREENNAME" option (short form "SCR") is as follows. 
  4719.  
  4720.  
  4721.      OPTION SCREENNAME 'name' 
  4722.  
  4723.  where 
  4724.       description 
  4725.  
  4726.  name 
  4727.       specifies the screen name. 
  4728.  
  4729.  If the "SCREENNAME" option is not specified, the description text specified in 
  4730.  the "FORMAT" directive is used as the screen name. 
  4731.  
  4732.  
  4733. ΓòÉΓòÉΓòÉ 3.80. The SEGMENT Directive ΓòÉΓòÉΓòÉ
  4734.  
  4735.  
  4736. Formats:  OS/2, QNX, Win16, Win32 
  4737.  
  4738. The "SEGMENT" directive is used to describe the attributes of code and data 
  4739. segments.  The format of the "SEGMENT" directive (short form "SEG") is as 
  4740. follows. 
  4741.  
  4742.  
  4743.      SEGMENT seg_desc{,seg_desc} 
  4744.  
  4745.      seg_desc ::= seg_id {seg_attrs}+ 
  4746.  
  4747.      seg_id ::= 'seg_name' | CLASS 'class_name' | TYPE [CODE | DATA] 
  4748.  
  4749.    OS/2: 
  4750.      seg_attrs ::= PRELOAD | LOADONCALL 
  4751.                | IOPL | NOIOPL 
  4752.                | EXECUTEONLY | EXECUTEREAD 
  4753.                | READONLY | READWRITE 
  4754.                | SHARED | NONSHARED 
  4755.                | CONFORMING | NONCONFORMING 
  4756.                | PERMANENT | NONPERMANENT 
  4757.                | INVALID | RESIDENT 
  4758.                | CONTIGUOUS | DYNAMIC 
  4759.    Win32: 
  4760.      seg_attrs ::= PAGEABLE | NONPAGEABLE 
  4761.                | SHARED | NONSHARED 
  4762.  
  4763.    Win16: 
  4764.      seg_attrs ::= PRELOAD | LOADONCALL 
  4765.                | EXECUTEONLY | EXECUTEREAD 
  4766.                | READONLY | READWRITE 
  4767.                | SHARED | NONSHARED 
  4768.                | MOVEABLE | FIXED 
  4769.                | DISCARDABLE 
  4770.    QNX: 
  4771.      seg_attrs ::= EXECUTEONLY | EXECUTEREAD 
  4772.                | READONLY | READWRITE 
  4773.  
  4774.  where 
  4775.       description 
  4776.  
  4777.  seg_name 
  4778.       is the name of the code or data segment whose attributes are being 
  4779.       specified. 
  4780.  
  4781.  class_name 
  4782.       is a class name.  The attributes will be assigned to all segments 
  4783.       belonging to the specified class. 
  4784.  
  4785.  PRELOAD 
  4786.       (short form "PR", OS/2 and Win16 only) specifies that the segment is 
  4787.       loaded as soon as the executable file is loaded.  This is the default. 
  4788.  
  4789.  LOADONCALL 
  4790.       (short form "LO", OS/2 and Win16 only) specifies that the segment is 
  4791.       loaded only when accessed. 
  4792.  
  4793.  PAGEABLE 
  4794.       (short form "PAGE", Win32 only) specifies that the segment can be paged 
  4795.       from memory.  This is the default. 
  4796.  
  4797.  NONPAGEABLE 
  4798.       (short form "NONP", Win32 only) specifies that the segment, once loaded 
  4799.       into memory, must remain in memory. 
  4800.  
  4801.  CONFORMING 
  4802.       (short form "CON", OS/2 only) specifies that the segment will assume the 
  4803.       I/O privilege of the segment that referenced it.  By default, the segment 
  4804.       is "NONCONFORMING". 
  4805.  
  4806.  NONCONFORMING 
  4807.       (short form "NONC", OS/2 only) specifies that the segment will not assume 
  4808.       the I/O privilege of the segment that referenced it.  This is the 
  4809.       default. 
  4810.  
  4811.  IOPL 
  4812.       (short form "I", OS/2 only) specifies that the segment requires I/O 
  4813.       privilege.  That is, they can access the hardware directly. 
  4814.  
  4815.  NOIOPL 
  4816.       (short form "NOI", OS/2 only) specifies that the segment does not require 
  4817.       I/O privilege.  This is the default. 
  4818.  
  4819.  PERMANENT 
  4820.       (short form "PERM", OS/2 32-bit only) specifies that the segment is 
  4821.       permanent. 
  4822.  
  4823.  NONPERMANENT 
  4824.       (short form "NONPERM", OS/2 32-bit only) specifies that the segment is 
  4825.       not permanent. 
  4826.  
  4827.  INVALID 
  4828.       (short form "INV", OS/2 32-bit only) specifies that the segment is 
  4829.       invalid. 
  4830.  
  4831.  RESIDENT 
  4832.       (short form "RES", OS/2 32-bit only) specifies that the segment is 
  4833.       resident. 
  4834.  
  4835.  CONTIGUOUS 
  4836.       (short form "CONT", OS/2 32-bit only) specifies that the segment is 
  4837.       contiguous. 
  4838.  
  4839.  DYNAMIC 
  4840.       (short form "DYN", OS/2 32-bit only) specifies that the segment is 
  4841.       dynamic. 
  4842.  
  4843.  EXECUTEONLY 
  4844.       (short form "EXECUTEO", OS/2, QNX and Win16 only) specifies that the 
  4845.       segment can only be executed.  This attribute should only be specified 
  4846.       for code segments.  This attribute should not be specified if it is 
  4847.       possible for the code segment to contain jump tables which is the case 
  4848.       with the Watcom C, C++ and FORTRAN 77 optimizing compilers. 
  4849.  
  4850.  EXECUTEREAD 
  4851.       (short form "EXECUTER", OS/2, QNX and Win16 only) specifies that the 
  4852.       segment can only be executed and read.  This attribute, the default for 
  4853.       code segments, should only be specified for code segments.  This 
  4854.       attribute is appropriate for code segments that contain jump tables as is 
  4855.       possible with the Watcom C, C++ and FORTRAN 77 optimizing compilers. 
  4856.  
  4857.  READONLY 
  4858.       (short form "READO", OS/2, QNX and Win16 only) specifies that the segment 
  4859.       can only be read.  This attribute should only be specified for data 
  4860.       segments. 
  4861.  
  4862.  READWRITE 
  4863.       (short form "READW", OS/2, QNX and Win16 only) specifies that the segment 
  4864.       can be read and written.  This is the default for data segments.  This 
  4865.       attribute should only be specified for data segments. 
  4866.  
  4867.  SHARED 
  4868.       (short form "SH" ) specifies that a single copy of the segment will be 
  4869.       loaded and will be shared by all processes. 
  4870.  
  4871.  NONSHARED 
  4872.       (short form "NONS") specifies that a unique copy of the segment will be 
  4873.       loaded for each process.  This is the default. 
  4874.  
  4875.  MOVEABLE 
  4876.       (short form "MOV", Win16 only) specifies that the segment is moveable. 
  4877.       By default, segments are moveable. 
  4878.  
  4879.  FIXED 
  4880.       (short form "FIX", Win16 only) specifies that the segment is fixed. 
  4881.  
  4882.  DISCARDABLE 
  4883.       (short form "DIS", Win16 only) specifies that the segment is discardable. 
  4884.       By default, segments are not discardable. 
  4885.  
  4886.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  4887.  
  4888.   Note:  Attributes specified for segments identified by a segment name 
  4889.  override attributes specified for segments identified by a class name. 
  4890.  
  4891.   ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ
  4892.  
  4893.  
  4894. ΓòÉΓòÉΓòÉ 3.81. The SHARELIB Option ΓòÉΓòÉΓòÉ
  4895.  
  4896.  
  4897. Formats:  NetWare 
  4898.  
  4899. The "SHARELIB" option specifies the file name of an NLM to be loaded as a 
  4900. shared NLM.  Shared NLMs contain global code and global data that are mapped 
  4901. into all memory protection domains.  This method of loading APIs can be used to 
  4902. avoid ring transitions to call other APIs in other domains. 
  4903.  
  4904. The format of the "SHARELIB" option (short form "SHA") is as follows. 
  4905.  
  4906.  
  4907.      OPTION SHARELIB=shared_nlm 
  4908.  
  4909.  where 
  4910.       description 
  4911.  
  4912.  shared_nlm 
  4913.       is the file name of the shared NLM. 
  4914.  
  4915.  
  4916. ΓòÉΓòÉΓòÉ 3.82. The SHOWDEAD Option ΓòÉΓòÉΓòÉ
  4917.  
  4918.  
  4919. Formats:  All 
  4920.  
  4921. The "SHOWDEAD" option instructs the linker to list, in the map file, the 
  4922. symbols associated with dead code and unused C++ virtual functions that it has 
  4923. eliminated from the link.  The format of the "SHOWDEAD" option (short form 
  4924. "SHO") is as follows. 
  4925.  
  4926.  
  4927.      OPTION SHOWDEAD 
  4928.  
  4929. The "SHOWDEAD" option works best in concert with the "ELIMINATE" and 
  4930. "VFREMOVAL" options. 
  4931.  
  4932.  
  4933. ΓòÉΓòÉΓòÉ 3.83. The SORT Directive ΓòÉΓòÉΓòÉ
  4934.  
  4935.  
  4936. Formats:  All 
  4937.  
  4938. The "SORT" directive is used to sort the symbols in the "Memory Map" section of 
  4939. the map file.  By default, symbols are listed on a per module basis in the 
  4940. order the modules were encountered by the linker.  That is, a module header is 
  4941. displayed followed by the symbols defined by the module. 
  4942.  
  4943. The format of the "SORT" directive (short form "SO") is as follows. 
  4944.  
  4945.  
  4946.      SORT [GLOBAL] [ALPHABETICAL] 
  4947.  
  4948. If the "SORT" directive is specified without any options, as in the following 
  4949. example, the module headers will be displayed each followed by the list of 
  4950. symbols it defines sorted by address. 
  4951.  
  4952.  
  4953.    sort 
  4954.  
  4955. If only the "GLOBAL" sort option (short form "GL") is specified, as in the 
  4956. following example, the module headers will not be displayed and all symbols 
  4957. will be sorted by address. 
  4958.  
  4959.  
  4960.    sort global 
  4961.  
  4962. If only the "ALPHABETICAL" sort option (short form "ALP") is specified, as in 
  4963. the following example, the module headers will be displayed each followed by 
  4964. the list of symbols it defines sorted alphabetically. 
  4965.  
  4966.  
  4967.    sort alphabetical 
  4968.  
  4969. If both the "GLOBAL" and "ALPHABETICAL" sort options are specified, as in the 
  4970. following example, the module headers will not be displayed and all symbols 
  4971. will be sorted alphabetically. 
  4972.  
  4973.  
  4974.    sort global alphabetical 
  4975.  
  4976. If you are linking a Watcom C++ application, mangled names are sorted by using 
  4977. the base name.  The base name is the name of the symbol as it appeared in the 
  4978. source file.  See the section entitled The MANGLEDNAMES Option for more 
  4979. information on mangled names. 
  4980.  
  4981.  
  4982. ΓòÉΓòÉΓòÉ 3.84. The STACK Option ΓòÉΓòÉΓòÉ
  4983.  
  4984.  
  4985. Formats:  All 
  4986.  
  4987. The "STACK" option can be used to increase the size of the stack.  The format 
  4988. of the "STACK" option (short form "ST") is as follows. 
  4989.  
  4990.  
  4991.      OPTION STACK=n 
  4992.  
  4993.  where 
  4994.       description 
  4995.  
  4996.  n 
  4997.       represents a value.  The complete form of n is the following. 
  4998.  
  4999.  
  5000.          [0x]d{d}[k|m] 
  5001.  
  5002.       d represents a decimal digit.  If 0x is specified, the string of digits 
  5003.       represents a hexadecimal number.  If k is specified, the value is 
  5004.       multiplied by 1024.  If m is specified, the value is multiplied by 
  5005.       1024*1024. 
  5006.  
  5007.  The default stack size varies for both 16-bit and protected-mode 32-bit 
  5008.  applications depending on the executable format.  You can determine the 
  5009.  default stack size by looking at the map file that can be generated when an 
  5010.  application is linked ("OPTION MAP").  During execution of your program, you 
  5011.  may get an error message indicating your stack has overflowed.  If you 
  5012.  encounter such an error, you must link your application again, this time 
  5013.  specifying a larger stack size using the "STACK" option. 
  5014.  
  5015.  Example: 
  5016.  
  5017.     option stack=8192 
  5018.  
  5019.  
  5020. ΓòÉΓòÉΓòÉ 3.85. The START Option ΓòÉΓòÉΓòÉ
  5021.  
  5022.  
  5023. Formats:  All 
  5024.  
  5025. The format of the "START" option is as follows. 
  5026.  
  5027.  
  5028.      OPTION START=symbol_name 
  5029.  
  5030.  where 
  5031.       description 
  5032.  
  5033.  symbol_name 
  5034.       specifies the name of the procedure where execution begins. 
  5035.  
  5036.  For the Netware 386 executable format, the default name of the start procedure 
  5037.  is "_Prelude". 
  5038.  
  5039.  
  5040. ΓòÉΓòÉΓòÉ 3.86. The STARTLINK Directive ΓòÉΓòÉΓòÉ
  5041.  
  5042.  
  5043. Formats:  All 
  5044.  
  5045. The "STARTLINK" directive is used to indicate the start of a new set of linker 
  5046. commands that are to be processed after the current set of commands has been 
  5047. processed.  The format of the "STARTLINK" directive (short form "STARTL") is as 
  5048. follows. 
  5049.  
  5050.  
  5051.      STARTLINK 
  5052.  
  5053. The "ENDLINK" directive is used to indicate the end of the set of commands 
  5054. identified by the "STARTLINK" directive. 
  5055.  
  5056.  
  5057. ΓòÉΓòÉΓòÉ 3.87. The STATICS Option ΓòÉΓòÉΓòÉ
  5058.  
  5059.  
  5060. Formats:  All 
  5061.  
  5062. The "STATICS" option should only be used if you are developing a Watcom C or 
  5063. C++ application.  The Watcom C and C++ compilers produce definitions for static 
  5064. symbols in the object file.  By default, these static symbols do not appear in 
  5065. the map file.  If you want static symbols to be displayed in the map file, use 
  5066. the "STATICS" option. 
  5067.  
  5068. The format of the "STATICS" option (short form "STAT") is as follows. 
  5069.  
  5070.  
  5071.      OPTION STATICS 
  5072.  
  5073.  
  5074. ΓòÉΓòÉΓòÉ 3.88. The STUB Option ΓòÉΓòÉΓòÉ
  5075.  
  5076.  
  5077. Formats:  OS/2, Win16, Win32 
  5078.  
  5079. The "STUB" option specifies an executable file containing a "stub" program that 
  5080. is to be placed at the beginning of the executable file being generated.  The 
  5081. "stub" program will be executed if the module is executed under DOS.  The 
  5082. format of the "STUB" option is as follows. 
  5083.  
  5084.  
  5085.      OPTION STUB=stub_name 
  5086.  
  5087.  where 
  5088.       description 
  5089.  
  5090.  stub_name 
  5091.       is a file specification for the name of the stub executable file.  If no 
  5092.       file extension is specified, a file extension of "EXE" is assumed. 
  5093.  
  5094.  The Watcom Linker will search all paths specified in the PATH environment 
  5095.  variable for the stub executable file.  The stub executable file specified by 
  5096.  the "STUB" option must not be the same as the executable file being generated. 
  5097.  
  5098.  
  5099. ΓòÉΓòÉΓòÉ 3.89. The SYMFILE Option ΓòÉΓòÉΓòÉ
  5100.  
  5101.  
  5102. Formats:  All 
  5103.  
  5104. The "SYMFILE" option provides a method for specifying an alternate file for 
  5105. debugging information.  The format of the "SYMFILE" option (short form "SYMF") 
  5106. is as follows. 
  5107.  
  5108.  
  5109.      OPTION SYMFILE[=symbol_file] 
  5110.  
  5111.  where 
  5112.       description 
  5113.  
  5114.  symbol_file 
  5115.       is a file specification for the name of the symbol file.  If no file 
  5116.       extension is specified, a file extension of "sym" is assumed. 
  5117.  
  5118.  By default, no symbol file is generated; debugging information is appended at 
  5119.  the end of the executable file.  Specifying this option causes the Watcom 
  5120.  Linker to generate a symbol file.  The symbol file contains the debugging 
  5121.  information generated by the linker when the "DEBUG" directive is used.  The 
  5122.  symbol file can then be used by Watcom Debugger.  If no debugging information 
  5123.  is requested, no symbol file is created, regardless of the presence of the 
  5124.  "SYMFILE" option. 
  5125.  
  5126.  If no file name is specified, the symbol file will have a default file 
  5127.  extension of "sym" and the same path and file name as the executable file. 
  5128.  Note that the symbol file will be placed in the same directory as the 
  5129.  executable file. 
  5130.  
  5131.  Alternatively, a file name can be specified.  The following directive 
  5132.  instructs the linker to generate a symbol file and call it "myprog.sym" 
  5133.  regardless of the name of the executable file. 
  5134.  
  5135.  
  5136.     option symf=myprog 
  5137.  
  5138.  You can also specify a path and/or file extension when using the "SYMFILE=" 
  5139.  form of the "SYMFILE" option. 
  5140.  
  5141.  Notes: 
  5142.  
  5143.    1. This option should be used to debug a DOS "COM" executable file.  A DOS 
  5144.       "COM" executable file must not contain any additional information other 
  5145.       than the executable information itself since DOS uses the size of the 
  5146.       file to determine what to load. 
  5147.  
  5148.    2. This option should be used when creating a Microsoft Windows executable 
  5149.       file.  Typically, before an executable file can be executed as a 
  5150.       Microsoft Windows application, a resource compiler takes the Windows 
  5151.       executable file and a resource file as input and combines them.  If the 
  5152.       executable file contains debugging information, the resource compiler 
  5153.       will strip the debugging information from the executable file. 
  5154.       Therefore, debugging information must not be part of the executable file 
  5155.       created by the linker. 
  5156.  
  5157.  
  5158. ΓòÉΓòÉΓòÉ 3.90. The SYMTRACE Directive ΓòÉΓòÉΓòÉ
  5159.  
  5160.  
  5161. Formats:  All 
  5162.  
  5163. The "SYMTRACE" directive instructs the Watcom Linker to print a list of all 
  5164. modules that reference the specified symbols.  The format of the "SYMTRACE" 
  5165. directive (short form "SYMT") is as follows. 
  5166.  
  5167.  
  5168.      SYMTRACE  symbol_name{,symbol_name} 
  5169.  
  5170.  where 
  5171.       description 
  5172.  
  5173.  symbol_name 
  5174.       is the name of a symbol. 
  5175.  
  5176.  The information is displayed in the map file.  Consider the following example. 
  5177.  
  5178.  Example: 
  5179.  
  5180.     wlink system my_os op map file test lib math symt sin, cos 
  5181.  
  5182.  The Watcom Linker will list, in the map file, all modules that reference the 
  5183.  symbols "sin" and "cos". 
  5184.  
  5185.  
  5186. ΓòÉΓòÉΓòÉ 3.91. The SYNCHRONIZE Option ΓòÉΓòÉΓòÉ
  5187.  
  5188.  
  5189. Formats:  NetWare 
  5190.  
  5191. The "SYNCHRONIZE" option forces an NLM to complete loading before starting to 
  5192. load other NLMs.  Normally, the other NLMs are loading during the startup 
  5193. procedure.  The format of the "SYNCHRONIZE" option (short form "SY") is as 
  5194. follows. 
  5195.  
  5196.  
  5197.      OPTION SYNCHRONIZE 
  5198.  
  5199.  
  5200. ΓòÉΓòÉΓòÉ 3.92. The SYSTEM Directive ΓòÉΓòÉΓòÉ
  5201.  
  5202.  
  5203. Formats:  All 
  5204.  
  5205. There are three forms of the "SYSTEM" directive. 
  5206.  
  5207. The first form of the "SYSTEM" directive (short form "SYS") is called a system 
  5208. definition directive.  It allows you to associate a set of linker directives 
  5209. with a specified name called the system name.  This set of linker directives is 
  5210. called a system definition block.  The format of a system definition directive 
  5211. is as follows. 
  5212.  
  5213.  
  5214.      SYSTEM BEGIN system_name {directive} END 
  5215.  
  5216.  where 
  5217.       description 
  5218.  
  5219.  system_name 
  5220.       is a unique system name. 
  5221.  
  5222.  directive 
  5223.       is a linker directive. 
  5224.  
  5225.  A system definition directive cannot be specified within another system 
  5226.  definition directive. 
  5227.  
  5228.  The second form of the "SYSTEM" directive is called a system deletion 
  5229.  directive.  It allows you to remove the association of a set of linker 
  5230.  directives with a system name.  The format of a system deletion directive is 
  5231.  as follows. 
  5232.  
  5233.  
  5234.       SYSTEM DELETE system_name 
  5235.  
  5236.  where 
  5237.       description 
  5238.  
  5239.  system_name 
  5240.       is a defined system name. 
  5241.  
  5242.  The third form of the "SYSTEM" directive is as follows. 
  5243.  
  5244.  
  5245.       SYSTEM system_name 
  5246.  
  5247.  where 
  5248.       description 
  5249.  
  5250.  system_name 
  5251.       is a defined system name. 
  5252.  
  5253.  When this form of the "SYSTEM" directive is encountered, all directives 
  5254.  specified in the system definition block identified by system_name will be 
  5255.  processed. 
  5256.  
  5257.  Let us consider an example that demonstrates the use of the "SYSTEM" 
  5258.  directive.  The following linker directives define a system called statistics. 
  5259.  
  5260.  
  5261.     system begin statistics 
  5262.     format dos 
  5263.     libpath \libs 
  5264.     library stats, graphics 
  5265.     option stack=8k 
  5266.     end 
  5267.  
  5268.  They specify that a statistics application is to be created by using the 
  5269.  libraries "stats.lib" and "graphics.lib".  These library files are located in 
  5270.  the directory "\libs".  The application requires a stack size of 8k and the 
  5271.  specified format of executable will be generated. 
  5272.  
  5273.  Suppose the linker directives in the above example are contained in the file 
  5274.  "stats.lnk".  If we wish to create a statistics application, we can issue the 
  5275.  following command. 
  5276.  
  5277.  
  5278.     wlink @stats system statistics file myappl 
  5279.  
  5280.  As demonstrated by the above example, the "SYSTEM" directive can be used to 
  5281.  localize the common attributes that describe a class of applications. 
  5282.  
  5283.  The system deletion directive can be used to redefine a previously defined 
  5284.  system.  Consider the following example. 
  5285.  
  5286.  
  5287.     system begin at_dos 
  5288.       libpath %WATCOM%\lib286 
  5289.       libpath %WATCOM%\lib286\dos 
  5290.       format dos ^ 
  5291.     end 
  5292.     system begin n98_dos 
  5293.       sys at_dos ^ 
  5294.       libpath %WATCOM%\lib286\dos\n98 
  5295.     end 
  5296.     system begin dos 
  5297.     sys at_dos ^ 
  5298.     end 
  5299.  
  5300.  If you wish to redefine the definition of the "dos" system, you can specify 
  5301.  the following set of directives. 
  5302.  
  5303.  
  5304.     system delete dos 
  5305.     system begin dos 
  5306.     sys n98_dos ^ 
  5307.     end 
  5308.  
  5309.  This effectively redefines a "dos" system to be equivalent to a "n98_dos" 
  5310.  system (NEC PC-9800 DOS), rather than the previously defined "at_dos" system 
  5311.  (AT-compatible DOS). 
  5312.  
  5313.  For additional examples on the use of the "SYSTEM" directive, examine the 
  5314.  contents of the WLINK.LNK and WLSYSTEM.LNK files. 
  5315.  
  5316.  The file WLINK.LNK is a special linker directive file that is automatically 
  5317.  processed by the Watcom Linker before processing any other directives.  On a 
  5318.  DOS, OS/2, or Windows-hosted system, this file must be located in one of the 
  5319.  paths specified in the PATH environment variable.  On a QNX-hosted system, 
  5320.  this file should be located in the /etc directory.  A default version of this 
  5321.  file is located in the \WATCOM\BINW directory on DOS-hosted systems, the 
  5322.  \WATCOM\BINP directory on OS/2-hosted systems, the /etc directory on 
  5323.  QNX-hosted systems, and the \WATCOM\BINNT directory on Windows 95 or Windows 
  5324.  NT-hosted systems.  Note that the file WLINK.LNK includes the file 
  5325.  WLSYSTEM.LNK which is located in the \WATCOM\BINW directory on DOS, OS/2, or 
  5326.  Windows-hosted systems and the /etc directory on QNX-hosted systems. 
  5327.  
  5328.  The files WLINK.LNK and WLSYSTEM.LNK reference the WATCOM environment variable 
  5329.  which must be set to the directory in which you installed your software. 
  5330.  
  5331.  
  5332. ΓòÉΓòÉΓòÉ 3.92.1. Special System Names ΓòÉΓòÉΓòÉ
  5333.  
  5334.  
  5335. There are two special system names.  When the linker has processed all object 
  5336. files and the executable file format has not been determined, and a system 
  5337. definition block has not been processed, the directives specified in the "286" 
  5338. or "386" system definition block will be processed.  The "386" system 
  5339. definition block will be processed if a 32-bit object file has been processed. 
  5340. Furthermore, only a restricted set of linker directives is allowed in a "286" 
  5341. and "386" system definition block.  They are as follows. 
  5342.  
  5343.      FORMAT 
  5344.      LIBFILE 
  5345.      LIBPATH 
  5346.      LIBRARY 
  5347.      NAME 
  5348.      OPTION 
  5349.      RUNTIME (for Phar Lap executable files only) 
  5350.      SEGMENT (for OS/2 and QNX executable files only) 
  5351.  
  5352.  
  5353. ΓòÉΓòÉΓòÉ 3.93. The THREADNAME Option ΓòÉΓòÉΓòÉ
  5354.  
  5355.  
  5356. Formats:  NetWare 
  5357.  
  5358. The "THREADNAME" option is used to specify the pattern to be used for 
  5359. generating thread names.  The format of the "THREADNAME" option (short form 
  5360. "THR") is as follows. 
  5361.  
  5362.  
  5363.      OPTION THREADNAME 'thread_name' 
  5364.  
  5365.  where 
  5366.       description 
  5367.  
  5368.  thread_name 
  5369.       specifies the pattern used for generating thread names and must be a 
  5370.       string of 1 to 5 characters. 
  5371.  
  5372.  The first thread name is generated by appending "0" to thread_name, the second 
  5373.  by appending "1" to thread_name, etc.  If the "THREADNAME" option is not 
  5374.  specified, the first 5 characters of the description specified in the "FORMAT" 
  5375.  directive are used as the pattern for generating thread names. 
  5376.  
  5377.  
  5378. ΓòÉΓòÉΓòÉ 3.94. The TOGGLERELOCS Option ΓòÉΓòÉΓòÉ
  5379.  
  5380.  
  5381. Formats:  OS/2 
  5382.  
  5383. The "TOGGLERELOCS" option is used with LX format executables under 32-bit 
  5384. DOS/4G only.  The "INTERNALRELOCS" option causes the Watcom Linker to include 
  5385. internal relocation information in DOS/4G LX format executables.  Having done 
  5386. so, the linker normally clears the "internal fixups done" flag in the LX 
  5387. executable header (bit 0x10).  The "TOGGLERELOCS" option causes the linker to 
  5388. toggle the value of the "internal fixups done" flag in the LX executable header 
  5389. (bit 0x10).  This option is used with DOS/4G non-zero based executables. 
  5390. Contact Tenberry Software for further explanation. 
  5391.  
  5392. The format of the "TOGGLERELOCS" option (short form "TOG") is as follows. 
  5393.  
  5394.  
  5395.      OPTION TOGGLERELOCS 
  5396.  
  5397.  
  5398. ΓòÉΓòÉΓòÉ 3.95. The UNDEFSOK Option ΓòÉΓòÉΓòÉ
  5399.  
  5400.  
  5401. Formats:  All 
  5402.  
  5403. The "UNDEFSOK" option tells the Watcom Linker to generate an executable file 
  5404. even if undefined symbols are present.  By default, no executable file will be 
  5405. generated if undefined symbols are present. 
  5406.  
  5407. The format of the "UNDEFSOK" option (short form "U") is as follows. 
  5408.  
  5409.  
  5410.      OPTION UNDEFSOK 
  5411.  
  5412. The "NOUNDEFSOK" option tells the Watcom Linker to not generate an executable 
  5413. file if undefined symbols are present.  This is the default behaviour. 
  5414.  
  5415. The format of the "NOUNDEFSOK" option (short form "NOU") is as follows. 
  5416.  
  5417.  
  5418.      OPTION NOUNDEFSOK 
  5419.  
  5420.  
  5421. ΓòÉΓòÉΓòÉ 3.96. The VERBOSE Option ΓòÉΓòÉΓòÉ
  5422.  
  5423.  
  5424. Formats:  All 
  5425.  
  5426. The "VERBOSE" option controls the amount of information produced by the Watcom 
  5427. Linker in the map file.  The format of the "VERBOSE" option (short form "V") is 
  5428. as follows. 
  5429.  
  5430.  
  5431.      OPTION VERBOSE 
  5432.  
  5433. If the "VERBOSE" option is specified, the linker will list, for each object 
  5434. file, all segments it defines and their sizes.  By default, this information is 
  5435. not produced in the map file. 
  5436.  
  5437.  
  5438. ΓòÉΓòÉΓòÉ 3.97. The VERSION Option ΓòÉΓòÉΓòÉ
  5439.  
  5440.  
  5441. Formats:  NetWare, OS/2, Win16, Win32 
  5442.  
  5443. The "VERSION" option can be used to identify the application so that it can be 
  5444. distinguished from other versions (releases) of the same application. 
  5445.  
  5446. This option is most useful when creating a DLL or NLM since applications that 
  5447. use the DLL or NLM may only execute with a specific version of the DLL or NLM. 
  5448.  
  5449. The format of the "VERSION" option (short form "VERS") is as follows. 
  5450.  
  5451.  
  5452.    OS/2, Win16, Win32: 
  5453.      OPTION VERSION=major[.minor] 
  5454.    Netware: 
  5455.      OPTION VERSION=major[.minor[.revision]] 
  5456.  
  5457.  where 
  5458.       description 
  5459.  
  5460.  major 
  5461.       specifies the major version number. 
  5462.  
  5463.  minor 
  5464.       specifies the minor version number and must be less than 100. 
  5465.  
  5466.  revision 
  5467.       specifies the revision.  The revision should be a number or a letter.  If 
  5468.       it is a number, it must be less than 27. 
  5469.  
  5470.  
  5471. ΓòÉΓòÉΓòÉ 3.98. The VFREMOVAL Option ΓòÉΓòÉΓòÉ
  5472.  
  5473.  
  5474. Formats:  All 
  5475.  
  5476. The "VFREMOVAL" option instructs the linker to remove unused C++ virtual 
  5477. functions.  The format of the "VFREMOVAL" option (short form "VFR") is as 
  5478. follows. 
  5479.  
  5480.  
  5481.      OPTION VFREMOVAL 
  5482.  
  5483. If the "VFREMOVAL" option is specified, the linker will attempt to eliminate 
  5484. unused virtual functions.  In order for the linker to do this, the Watcom C++ 
  5485. "zv" compiler option must be used for all object files in the executable.  The 
  5486. "VFREMOVAL" option works best in concert with the "ELIMINATE" option. 
  5487.  
  5488.  
  5489. ΓòÉΓòÉΓòÉ 3.99. The XDCDATA Option ΓòÉΓòÉΓòÉ
  5490.  
  5491.  
  5492. Formats:  NetWare 
  5493.  
  5494. The "XDCDATA" option specifies the name of a file that contains Remote 
  5495. Procedure Call (RPC) descriptions for calls in this NLM.  RPC descriptions for 
  5496. APIs make it possible for APIs to be exported across memory-protection domain 
  5497. boundaries. 
  5498.  
  5499. The format of the "XDCDATA" option (short form "XDC") is as follows. 
  5500.  
  5501.  
  5502.      OPTION XDCDATA=rpc_file 
  5503.  
  5504.  where 
  5505.       description 
  5506.  
  5507.  rpc_file 
  5508.       is the name of the file containing RPC descriptions. 
  5509.  
  5510.  
  5511. ΓòÉΓòÉΓòÉ 4. DOS:  The DOS Executable File Format ΓòÉΓòÉΓòÉ
  5512.  
  5513.  
  5514. This chapter deals specifically with aspects of DOS executable files.  The DOS 
  5515. executable file format will only run under the DOS operating system. 
  5516.  
  5517. Input to the Watcom Linker is specified on the command line and can be 
  5518. redirected to one or more files or environment strings.  The Watcom Linker 
  5519. command line format is as follows. 
  5520.  
  5521.  
  5522.    WLINK {directive} 
  5523.  
  5524. where directive is any of the following: 
  5525.  
  5526.  ALIAS alias_name=symbol_name{,alias_name=symbol_name} 
  5527.  
  5528.  DEBUG dbtype [dblist] | 
  5529.  
  5530.  DISABLE msg_num{,msg_num} 
  5531.  
  5532.  ENDLINK 
  5533.  
  5534.  FILE obj_spec{,obj_spec} 
  5535.  
  5536.  FORMAT DOS [COM] 
  5537.  
  5538.  LANGUAGE lang 
  5539.  
  5540.  LIBFILE obj_file{,obj_file} 
  5541.  
  5542.  LIBPATH path_name{;path_name} 
  5543.  
  5544.  LIBRARY library_file{,library_file} 
  5545.  
  5546.  MODTRACE obj_module{,obj_module} 
  5547.  
  5548.  NAME exe_file 
  5549.  
  5550.  NEWSEGMENT 
  5551.  
  5552.  OPTION option{,option} 
  5553.  
  5554.       ARTIFICIAL 
  5555.  
  5556.       [NO]CACHE 
  5557.  
  5558.       [NO]CASEEXACT 
  5559.  
  5560.       CVPACK 
  5561.  
  5562.       DOSSEG 
  5563.  
  5564.       ELIMINATE 
  5565.  
  5566.       MANGLEDNAMES 
  5567.  
  5568.       MAP[=map_file] 
  5569.  
  5570.       MAXERRORS=n 
  5571.  
  5572.       NAMELEN=n 
  5573.  
  5574.       NODEFAULTLIBS 
  5575.  
  5576.       OSNAME='string' 
  5577.  
  5578.       PACKCODE=n 
  5579.  
  5580.       PACKDATA=n 
  5581.  
  5582.       QUIET 
  5583.  
  5584.       REDEFSOK 
  5585.  
  5586.       SHOWDEAD 
  5587.  
  5588.       STACK=n 
  5589.  
  5590.       START=symbol_name 
  5591.  
  5592.       STATICS 
  5593.  
  5594.       SYMFILE[=symbol_file] 
  5595.  
  5596.       [NO]UNDEFSOK 
  5597.  
  5598.       VERBOSE 
  5599.  
  5600.       VFREMOVAL 
  5601.  
  5602.  OPTLIB library_file{,library_file} 
  5603.  
  5604.  PATH path_name{;path_name} 
  5605.  
  5606.  REFERENCE symbol_name{,symbol_name} 
  5607.  
  5608.  SORT [GLOBAL] [ALPHABETICAL] 
  5609.  
  5610.  STARTLINK 
  5611.  
  5612.  SYMTRACE symbol_name{,symbol_name} 
  5613.  
  5614.  SYSTEM BEGIN system_name {directive} END 
  5615.  
  5616.  SYSTEM system_name 
  5617.  
  5618.  # comment 
  5619.  
  5620.  @ directive_file 
  5621.  
  5622.  
  5623.  You can view all the directives specific to DOS executable files by simply 
  5624.  typing the following: 
  5625.  
  5626.  
  5627.     wlink ? dos 
  5628.  
  5629.  Notes: 
  5630.  
  5631.    1. If the file "wlink.hlp" is located in one of the paths specified in the 
  5632.       "PATH" environment variable, the contents of that file will be displayed 
  5633.       when the following command is issued. 
  5634.  
  5635.  
  5636.          wlink ? 
  5637.  
  5638.    2. If all of the directive information does not fit on the command line, 
  5639.       type the following. 
  5640.  
  5641.  
  5642.          wlink 
  5643.  
  5644.       The prompt "WLINK>" will appear on the next line.  You can enter as many 
  5645.       lines of directive information as required.  Press "Ctrl/Z" followed by 
  5646.       the "Enter" key to terminate the input of directive information if you 
  5647.       are running a DOS, OS/2 or Windows NT-hosted version of the Watcom 
  5648.       Linker.  Press "Ctrl/D" to terminate the input of directive information 
  5649.       if you are running a QNX-hosted version of the Watcom Linker. 
  5650.  
  5651.  
  5652. ΓòÉΓòÉΓòÉ 4.1. DOS:  Memory Layout ΓòÉΓòÉΓòÉ
  5653.  
  5654.  
  5655. The following describes the segment ordering of an application linked by the 
  5656. Watcom Linker.  Note that this assumes that the "DOSSEG" linker option has been 
  5657. specified. 
  5658.  
  5659.    1. all segments not belonging to group "DGROUP" with class "CODE" 
  5660.  
  5661.    2. all other segments not belonging to group "DGROUP" 
  5662.  
  5663.    3. all segments belonging to group "DGROUP" with class "BEGDATA" 
  5664.  
  5665.    4. all segments belonging to group "DGROUP" not with class "BEGDATA", "BSS" 
  5666.       or "STACK" 
  5667.  
  5668.    5. all segments belonging to group "DGROUP" with class "BSS" 
  5669.  
  5670.    6. all segments belonging to group "DGROUP" with class "STACK" 
  5671.  
  5672.  A special segment belonging to class "BEGDATA" is defined when linking with 
  5673.  Watcom run-time libraries.  This segment is initialized with the hexadecimal 
  5674.  byte pattern "01" and is the first segment in group "DGROUP" so that storing 
  5675.  data at location 0 can be detected. 
  5676.  
  5677.  Segments belonging to class "BSS" contain uninitialized data.  Note that this 
  5678.  only includes uninitialized data in segments belonging to group "DGROUP". 
  5679.  Segments belonging to class "STACK" are used to define the size of the stack 
  5680.  used for your application.  Segments belonging to the classes "BSS" and 
  5681.  "STACK" are last in the segment ordering so that uninitialized data need not 
  5682.  take space in the executable file. 
  5683.  
  5684.  
  5685. ΓòÉΓòÉΓòÉ 4.2. DOS:  The Watcom Linker Memory Requirements ΓòÉΓòÉΓòÉ
  5686.  
  5687.  
  5688. The Watcom Linker uses all available memory when linking an application.  For 
  5689. DOS-hosted versions of the Watcom Linker, this includes expanded memory (EMS) 
  5690. and extended memory.  It is possible for the size of the image being linked to 
  5691. exceed the amount of memory available in your machine, particularly if the 
  5692. image file is to contain debugging information. For this reason, a temporary 
  5693. disk file is used when all available memory is used by the Watcom Linker. 
  5694.  
  5695. Normally, the temporary file is created in the default directory.  However, by 
  5696. defining the "tmp" environment variable to be a directory, you can tell the 
  5697. Watcom Linker where to create the temporary file.  This can be particularly 
  5698. useful if you have a RAM disk.  Consider the following definition of the "tmp" 
  5699. environment variable. 
  5700.  
  5701.  
  5702.    set tmp=\tmp 
  5703.  
  5704. The Watcom Linker will create the temporary file in the directory "\tmp". 
  5705.  
  5706.  
  5707. ΓòÉΓòÉΓòÉ 4.3. DOS:  Using Overlays ΓòÉΓòÉΓòÉ
  5708.  
  5709.  
  5710. The creation of overlaid executables is not supported by this version of the 
  5711. Watcom Linker. 
  5712.  
  5713.  
  5714. ΓòÉΓòÉΓòÉ 4.4. DOS:  Converting Microsoft Response Files to Directive Files ΓòÉΓòÉΓòÉ
  5715.  
  5716.  
  5717. A utility called MS2WLINK can be used to convert Microsoft linker response 
  5718. files to Watcom Linker directive files.  The response files must correspond to 
  5719. the linker found in version 7 or earlier of Microsoft C.  Later versions of 
  5720. response files such as those used with Microsoft Visual C++ are not entirely 
  5721. supported. 
  5722.  
  5723. The same utility can also convert much of the content of IBM OS/2 LINK386 
  5724. response files since the syntax is similar. 
  5725.  
  5726. Input to MS2WLINK is processed in the same way as the Microsoft linker 
  5727. processes its input.  The difference is that MS2WLINK writes the corresponding 
  5728. Watcom Linker directive file to the standard output device instead of a 
  5729. creating an executable file.  The resulting output can be redirected to a disk 
  5730. file which can then be used as input to the Watcom Linker to produce an 
  5731. executable file. 
  5732.  
  5733. Suppose you have a Microsoft linker response file called "test.rsp".  You can 
  5734. convert this file to a Watcom Linker directive file by issuing the following 
  5735. command. 
  5736.  
  5737. Example: 
  5738.  
  5739.    ms2wlink @test.rsp >test.lnk 
  5740.  
  5741. You can now use the Watcom Linker to link your program by issuing the following 
  5742. command. 
  5743.  
  5744. Example: 
  5745.  
  5746.    wlink @test 
  5747.  
  5748. An alternative way to link your application with the Watcom Linker from a 
  5749. Microsoft response file is to issue the following command. 
  5750.  
  5751. Example: 
  5752.  
  5753.    ms2wlink @test.rsp | wlink 
  5754.  
  5755. Since the Watcom Linker gets its input from the standard input device, you do 
  5756. not have to create a Watcom Linker directive file to link your application. 
  5757.  
  5758. Note that MS2WLINK can also process module-definition files used for creating 
  5759. OS/2 applications. 
  5760.  
  5761.  
  5762. ΓòÉΓòÉΓòÉ 5. ELF:  The ELF Executable File Format ΓòÉΓòÉΓòÉ
  5763.  
  5764.  
  5765. This chapter deals specifically with aspects of ELF executable files.  The ELF 
  5766. executable file format will only run under the operating systems that support 
  5767. the ELF executable file format. 
  5768.  
  5769. Input to the Watcom Linker is specified on the command line and can be 
  5770. redirected to one or more files or environment strings.  The Watcom Linker 
  5771. command line format is as follows. 
  5772.  
  5773.  
  5774.    WLINK {directive} 
  5775.  
  5776. where directive is any of the following: 
  5777.  
  5778.  ALIAS alias_name=symbol_name{,alias_name=symbol_name} 
  5779.  
  5780.  DEBUG dbtype [dblist] | 
  5781.  
  5782.  DISABLE msg_num{,msg_num} 
  5783.  
  5784.  ENDLINK 
  5785.  
  5786.  EXPORT entry_name {,entry_name} 
  5787.  
  5788.  FILE obj_spec{,obj_spec} 
  5789.  
  5790.  FORMAT ELF [DLL] 
  5791.  
  5792.  IMPORT external_name {,external_name} 
  5793.  
  5794.  LANGUAGE lang 
  5795.  
  5796.  LIBFILE obj_file{,obj_file} 
  5797.  
  5798.  LIBPATH path_name{;path_name} 
  5799.  
  5800.  LIBRARY library_file{,library_file} 
  5801.  
  5802.  MODFILE obj_file{,obj_file} 
  5803.  
  5804.  MODTRACE obj_module{,obj_module} 
  5805.  
  5806.  MODULE module_name {,module_name} 
  5807.  
  5808.  NAME exe_file 
  5809.  
  5810.  OPTION option{,option} 
  5811.  
  5812.       ALIGNMENT=n 
  5813.  
  5814.       ARTIFICIAL 
  5815.  
  5816.       [NO]CACHE 
  5817.  
  5818.       [NO]CASEEXACT 
  5819.  
  5820.       CVPACK 
  5821.  
  5822.       DOSSEG 
  5823.  
  5824.       ELIMINATE 
  5825.  
  5826.       INCREMENTAL 
  5827.  
  5828.       MANGLEDNAMES 
  5829.  
  5830.       MAP[=map_file] 
  5831.  
  5832.       MAXERRORS=n 
  5833.  
  5834.       NAMELEN=n 
  5835.  
  5836.       NODEFAULTLIBS 
  5837.  
  5838.       OSNAME='string' 
  5839.  
  5840.       QUIET 
  5841.  
  5842.       REDEFSOK 
  5843.  
  5844.       SHOWDEAD 
  5845.  
  5846.       STACK=n 
  5847.  
  5848.       START=symbol_name 
  5849.  
  5850.       STATICS 
  5851.  
  5852.       SYMFILE[=symbol_file] 
  5853.  
  5854.       [NO]UNDEFSOK 
  5855.  
  5856.       VERBOSE 
  5857.  
  5858.       VFREMOVAL 
  5859.  
  5860.  OPTLIB library_file{,library_file} 
  5861.  
  5862.  PATH path_name{;path_name} 
  5863.  
  5864.  REFERENCE symbol_name{,symbol_name} 
  5865.  
  5866.  SORT [GLOBAL] [ALPHABETICAL] 
  5867.  
  5868.  STARTLINK 
  5869.  
  5870.  SYMTRACE symbol_name{,symbol_name} 
  5871.  
  5872.  SYSTEM BEGIN system_name {directive} END 
  5873.  
  5874.  SYSTEM system_name 
  5875.  
  5876.  # comment 
  5877.  
  5878.  @ directive_file 
  5879.  
  5880.  
  5881.  You can view all the directives specific to ELF executable files by simply 
  5882.  typing the following: 
  5883.  
  5884.  
  5885.     wlink ? elf 
  5886.  
  5887.  Notes: 
  5888.  
  5889.    1. If the file "wlink.hlp" is located in one of the paths specified in the 
  5890.       "PATH" environment variable, the contents of that file will be displayed 
  5891.       when the following command is issued. 
  5892.  
  5893.  
  5894.          wlink ? 
  5895.  
  5896.    2. If all of the directive information does not fit on the command line, 
  5897.       type the following. 
  5898.  
  5899.  
  5900.          wlink 
  5901.  
  5902.       The prompt "WLINK>" will appear on the next line.  You can enter as many 
  5903.       lines of directive information as required.  Press "Ctrl/Z" followed by 
  5904.       the "Enter" key to terminate the input of directive information if you 
  5905.       are running a DOS, OS/2 or Windows NT-hosted version of the Watcom 
  5906.       Linker.  Press "Ctrl/D" to terminate the input of directive information 
  5907.       if you are running a QNX-hosted version of the Watcom Linker. 
  5908.  
  5909.  
  5910. ΓòÉΓòÉΓòÉ 5.1. ELF:  Memory Layout ΓòÉΓòÉΓòÉ
  5911.  
  5912.  
  5913. The following describes the segment ordering of an application linked by the 
  5914. Watcom Linker.  Note that this assumes that the "DOSSEG" linker option has been 
  5915. specified. 
  5916.  
  5917.    1. all segments not belonging to group "DGROUP" with class "CODE" 
  5918.  
  5919.    2. all other segments not belonging to group "DGROUP" 
  5920.  
  5921.    3. all segments belonging to group "DGROUP" with class "BEGDATA" 
  5922.  
  5923.    4. all segments belonging to group "DGROUP" not with class "BEGDATA", "BSS" 
  5924.       or "STACK" 
  5925.  
  5926.    5. all segments belonging to group "DGROUP" with class "BSS" 
  5927.  
  5928.    6. all segments belonging to group "DGROUP" with class "STACK" 
  5929.  
  5930.  A special segment belonging to class "BEGDATA" is defined when linking with 
  5931.  Watcom run-time libraries.  This segment is initialized with the hexadecimal 
  5932.  byte pattern "01" and is the first segment in group "DGROUP" so that storing 
  5933.  data at location 0 can be detected. 
  5934.  
  5935.  Segments belonging to class "BSS" contain uninitialized data.  Note that this 
  5936.  only includes uninitialized data in segments belonging to group "DGROUP". 
  5937.  Segments belonging to class "STACK" are used to define the size of the stack 
  5938.  used for your application.  Segments belonging to the classes "BSS" and 
  5939.  "STACK" are last in the segment ordering so that uninitialized data need not 
  5940.  take space in the executable file. 
  5941.  
  5942.  
  5943. ΓòÉΓòÉΓòÉ 5.2. ELF:  The Watcom Linker Memory Requirements ΓòÉΓòÉΓòÉ
  5944.  
  5945.  
  5946. The Watcom Linker uses all available memory when linking an application.  For 
  5947. DOS-hosted versions of the Watcom Linker, this includes expanded memory (EMS) 
  5948. and extended memory.  It is possible for the size of the image being linked to 
  5949. exceed the amount of memory available in your machine, particularly if the 
  5950. image file is to contain debugging information. For this reason, a temporary 
  5951. disk file is used when all available memory is used by the Watcom Linker. 
  5952.  
  5953. Normally, the temporary file is created in the default directory.  However, by 
  5954. defining the "tmp" environment variable to be a directory, you can tell the 
  5955. Watcom Linker where to create the temporary file.  This can be particularly 
  5956. useful if you have a RAM disk.  Consider the following definition of the "tmp" 
  5957. environment variable. 
  5958.  
  5959.  
  5960.    set tmp=\tmp 
  5961.  
  5962. The Watcom Linker will create the temporary file in the directory "\tmp". 
  5963.  
  5964.  
  5965. ΓòÉΓòÉΓòÉ 6. NetWare:  The NetWare 386 Executable File Format ΓòÉΓòÉΓòÉ
  5966.  
  5967.  
  5968. This chapter deals specifically with aspects of NetWare 386 executable files. 
  5969. The Novell NetWare 386 executable file format will only run under the NetWare 
  5970. 386 operating system. 
  5971.  
  5972. Input to the Watcom Linker is specified on the command line and can be 
  5973. redirected to one or more files or environment strings.  The Watcom Linker 
  5974. command line format is as follows. 
  5975.  
  5976.  
  5977.    WLINK {directive} 
  5978.  
  5979. where directive is any of the following: 
  5980.  
  5981.  ALIAS alias_name=symbol_name{,alias_name=symbol_name} 
  5982.  
  5983.  DEBUG dbtype [dblist] | 
  5984.  
  5985.  DISABLE msg_num{,msg_num} 
  5986.  
  5987.  ENDLINK 
  5988.  
  5989.  EXPORT entry_name {,entry_name} 
  5990.  
  5991.  FILE obj_spec{,obj_spec} 
  5992.  
  5993.  FORMAT NOVELL [NLM | LAN | DSK | NAM] 'description' 
  5994.  
  5995.  IMPORT external_name {,external_name} 
  5996.  
  5997.  LANGUAGE lang 
  5998.  
  5999.  LIBFILE obj_file{,obj_file} 
  6000.  
  6001.  LIBPATH path_name{;path_name} 
  6002.  
  6003.  LIBRARY library_file{,library_file} 
  6004.  
  6005.  MODTRACE obj_module{,obj_module} 
  6006.  
  6007.  MODULE module_name {,module_name} 
  6008.  
  6009.  NAME exe_file 
  6010.  
  6011.  OPTION option{,option} 
  6012.  
  6013.       ARTIFICIAL 
  6014.  
  6015.       [NO]CACHE 
  6016.  
  6017.       [NO]CASEEXACT 
  6018.  
  6019.       CHECK=symbol_name 
  6020.  
  6021.       COPYRIGHT 'string' 
  6022.  
  6023.       CUSTOM=file_name 
  6024.  
  6025.       CVPACK 
  6026.  
  6027.       DOSSEG 
  6028.  
  6029.       ELIMINATE 
  6030.  
  6031.       EXIT=symbol_name 
  6032.  
  6033.       HELP=help_file 
  6034.  
  6035.       IMPFILE[=imp_file] 
  6036.  
  6037.       IMPLIB[=imp_lib] 
  6038.  
  6039.       MANGLEDNAMES 
  6040.  
  6041.       MAP[=map_file] 
  6042.  
  6043.       MAXERRORS=n 
  6044.  
  6045.       MESSAGES=msg_file 
  6046.  
  6047.       MULTILOAD 
  6048.  
  6049.       NAMELEN=n 
  6050.  
  6051.       NLMFLAGS=some_value 
  6052.  
  6053.       NODEFAULTLIBS 
  6054.  
  6055.       OSDOMAIN 
  6056.  
  6057.       OSNAME='string' 
  6058.  
  6059.       PSEUDOPREEMPTION 
  6060.  
  6061.       QUIET 
  6062.  
  6063.       REDEFSOK 
  6064.  
  6065.       SHOWDEAD 
  6066.  
  6067.       REENTRANT 
  6068.  
  6069.       SCREENNAME 'name' 
  6070.  
  6071.       SHARELIB=shared_nlm 
  6072.  
  6073.       STACK=n 
  6074.  
  6075.       START=symbol_name 
  6076.  
  6077.       STATICS 
  6078.  
  6079.       SYMFILE[=symbol_file] 
  6080.  
  6081.       SYNCHRONIZE 
  6082.  
  6083.       THREADNAME 'thread_name' 
  6084.  
  6085.       [NO]UNDEFSOK 
  6086.  
  6087.       VERBOSE 
  6088.  
  6089.       VERSION=major[.minor[.revision]] 
  6090.  
  6091.       VFREMOVAL 
  6092.  
  6093.       XDCDATA=rpc_file 
  6094.  
  6095.  OPTLIB library_file{,library_file} 
  6096.  
  6097.  PATH path_name{;path_name} 
  6098.  
  6099.  REFERENCE symbol_name{,symbol_name} 
  6100.  
  6101.  SORT [GLOBAL] [ALPHABETICAL] 
  6102.  
  6103.  STARTLINK 
  6104.  
  6105.  SYMTRACE symbol_name{,symbol_name} 
  6106.  
  6107.  SYSTEM BEGIN system_name {directive} END 
  6108.  
  6109.  SYSTEM system_name 
  6110.  
  6111.  # comment 
  6112.  
  6113.  @ directive_file 
  6114.  
  6115.  
  6116.  You can view all the directives specific to NetWare 386 executable files by 
  6117.  simply typing the following: 
  6118.  
  6119.  
  6120.     wlink ? nov 
  6121.  
  6122.  Notes: 
  6123.  
  6124.    1. If the file "wlink.hlp" is located in one of the paths specified in the 
  6125.       "PATH" environment variable, the contents of that file will be displayed 
  6126.       when the following command is issued. 
  6127.  
  6128.  
  6129.          wlink ? 
  6130.  
  6131.    2. If all of the directive information does not fit on the command line, 
  6132.       type the following. 
  6133.  
  6134.  
  6135.          wlink 
  6136.  
  6137.       The prompt "WLINK>" will appear on the next line.  You can enter as many 
  6138.       lines of directive information as required.  Press "Ctrl/Z" followed by 
  6139.       the "Enter" key to terminate the input of directive information if you 
  6140.       are running a DOS, OS/2 or Windows NT-hosted version of the Watcom 
  6141.       Linker.  Press "Ctrl/D" to terminate the input of directive information 
  6142.       if you are running a QNX-hosted version of the Watcom Linker. 
  6143.  
  6144.  
  6145. ΓòÉΓòÉΓòÉ 6.1. NetWare:  NetWare Loadable Modules ΓòÉΓòÉΓòÉ
  6146.  
  6147.  
  6148. NetWare Loadable Modules (NLMs) are executable files that run in file server 
  6149. memory under the NetWare 386 operating system.  NLMs can be loaded and unloaded 
  6150. from file server memory while the server is running.  When running they 
  6151. actually become part of the operating system thus acting as building blocks for 
  6152. a server environment tailored to your needs. 
  6153.  
  6154. There are four types of NLMs, each identified by the file extension of the 
  6155. executable file. 
  6156.  
  6157.      Utility and server applications (executable files with extension "nlm"). 
  6158.      LAN drivers (executable files with extension "lan"). 
  6159.      Disk drivers (executable files with extension "dsk"). 
  6160.      Modules that define file system name spaces (executable files with 
  6161.       extension "nam"). 
  6162.  
  6163.  The Watcom Linker can generate all four types of NLMs. 
  6164.  
  6165.  
  6166. ΓòÉΓòÉΓòÉ 6.2. NetWare:  Memory Layout ΓòÉΓòÉΓòÉ
  6167.  
  6168.  
  6169. The following describes the segment ordering of an application linked by the 
  6170. Watcom Linker.  Note that this assumes that the "DOSSEG" linker option has been 
  6171. specified. 
  6172.  
  6173.    1. all segments not belonging to group "DGROUP" with class "CODE" 
  6174.  
  6175.    2. all other segments not belonging to group "DGROUP" 
  6176.  
  6177.    3. all segments belonging to group "DGROUP" with class "BEGDATA" 
  6178.  
  6179.    4. all segments belonging to group "DGROUP" not with class "BEGDATA", "BSS" 
  6180.       or "STACK" 
  6181.  
  6182.    5. all segments belonging to group "DGROUP" with class "BSS" 
  6183.  
  6184.    6. all segments belonging to group "DGROUP" with class "STACK" 
  6185.  
  6186.  A special segment belonging to class "BEGDATA" is defined when linking with 
  6187.  Watcom run-time libraries.  This segment is initialized with the hexadecimal 
  6188.  byte pattern "01" and is the first segment in group "DGROUP" so that storing 
  6189.  data at location 0 can be detected. 
  6190.  
  6191.  Segments belonging to class "BSS" contain uninitialized data.  Note that this 
  6192.  only includes uninitialized data in segments belonging to group "DGROUP". 
  6193.  Segments belonging to class "STACK" are used to define the size of the stack 
  6194.  used for your application.  Segments belonging to the classes "BSS" and 
  6195.  "STACK" are last in the segment ordering so that uninitialized data need not 
  6196.  take space in the executable file. 
  6197.  
  6198.  
  6199. ΓòÉΓòÉΓòÉ 6.3. NetWare:  The Watcom Linker Memory Requirements ΓòÉΓòÉΓòÉ
  6200.  
  6201.  
  6202. The Watcom Linker uses all available memory when linking an application.  For 
  6203. DOS-hosted versions of the Watcom Linker, this includes expanded memory (EMS) 
  6204. and extended memory.  It is possible for the size of the image being linked to 
  6205. exceed the amount of memory available in your machine, particularly if the 
  6206. image file is to contain debugging information. For this reason, a temporary 
  6207. disk file is used when all available memory is used by the Watcom Linker. 
  6208.  
  6209. Normally, the temporary file is created in the default directory.  However, by 
  6210. defining the "tmp" environment variable to be a directory, you can tell the 
  6211. Watcom Linker where to create the temporary file.  This can be particularly 
  6212. useful if you have a RAM disk.  Consider the following definition of the "tmp" 
  6213. environment variable. 
  6214.  
  6215.  
  6216.    set tmp=\tmp 
  6217.  
  6218. The Watcom Linker will create the temporary file in the directory "\tmp". 
  6219.  
  6220.  
  6221. ΓòÉΓòÉΓòÉ 7. OS/2:  The OS/2 Executable and DLL File Formats ΓòÉΓòÉΓòÉ
  6222.  
  6223.  
  6224. This chapter deals specifically with aspects of OS/2 executable files.  The 
  6225. OS/2 16-bit executable file format will run under the following operating 
  6226. systems. 
  6227.  
  6228.    1. 16-bit OS/2 1.x 
  6229.  
  6230.    2. 32-bit OS/2 2.x and 3.x (Warp) 
  6231.  
  6232.    3. Phar Lap's 286|DOS-Extender 
  6233.  
  6234.  The OS/2 32-bit linear executable file format will run under the following 
  6235.  operating systems. 
  6236.  
  6237.    1. OS/2 2.x (LX format only) 
  6238.  
  6239.    2. OS/2 3.x (LX format only) 
  6240.  
  6241.    3. Tenberry Software's DOS/4G and DOS/4GW DOS extenders (LE format only) 
  6242.  
  6243.    4. FlashTek's DOS Extender (LX format only) 
  6244.  
  6245.  Input to the Watcom Linker is specified on the command line and can be 
  6246.  redirected to one or more files or environment strings.  The Watcom Linker 
  6247.  command line format is as follows. 
  6248.  
  6249.  
  6250.     WLINK {directive} 
  6251.  
  6252.  where directive is any of the following: 
  6253.  
  6254.  ALIAS alias_name=symbol_name{,alias_name=symbol_name} 
  6255.  
  6256.  DEBUG dbtype [dblist] | 
  6257.  
  6258.  DISABLE msg_num{,msg_num} 
  6259.  
  6260.  ENDLINK 
  6261.  
  6262.  EXPORT export{,export} 
  6263.  
  6264.  EXPORT =lbc_file 
  6265.  
  6266.  FILE obj_spec{,obj_spec} 
  6267.  
  6268.  FORMAT OS2 [exe_type] [dll_form | exe_attrs] 
  6269.  
  6270.  IMPORT import{,import} 
  6271.  
  6272.  LANGUAGE lang 
  6273.  
  6274.  LIBFILE obj_file{,obj_file} 
  6275.  
  6276.  LIBPATH path_name{;path_name} 
  6277.  
  6278.  LIBRARY library_file{,library_file} 
  6279.  
  6280.  MODFILE obj_file{,obj_file} 
  6281.  
  6282.  MODTRACE obj_module{,obj_module} 
  6283.  
  6284.  NAME exe_file 
  6285.  
  6286.  NEWSEGMENT 
  6287.  
  6288.  PATH path_name{;path_name} 
  6289.  
  6290.  OPTION option{,option} 
  6291.  
  6292.       ALIGNMENT=n 
  6293.  
  6294.       ARTIFICIAL 
  6295.  
  6296.       [NO]CACHE 
  6297.  
  6298.       [NO]CASEEXACT 
  6299.  
  6300.       CVPACK 
  6301.  
  6302.       DESCRIPTION 'string' 
  6303.  
  6304.       DOSSEG 
  6305.  
  6306.       ELIMINATE 
  6307.  
  6308.       HEAPSIZE=n 
  6309.  
  6310.       IMPFILE[=imp_file] 
  6311.  
  6312.       IMPLIB[=imp_lib] 
  6313.  
  6314.       INCREMENTAL 
  6315.  
  6316.       INTERNALRELOCS 
  6317.  
  6318.       MANGLEDNAMES 
  6319.  
  6320.       MANYAUTODATA 
  6321.  
  6322.       MAP[=map_file] 
  6323.  
  6324.       MAXERRORS=n 
  6325.  
  6326.       MODNAME=module_name 
  6327.  
  6328.       NAMELEN=n 
  6329.  
  6330.       NEWFILES 
  6331.  
  6332.       NOAUTODATA 
  6333.  
  6334.       NODEFAULTLIBS 
  6335.  
  6336.       OFFSET 
  6337.  
  6338.       OLDLIBRARY=dll_name 
  6339.  
  6340.       ONEAUTODATA 
  6341.  
  6342.       OSNAME='string' 
  6343.  
  6344.       PACKCODE=n 
  6345.  
  6346.       PACKDATA=n 
  6347.  
  6348.       PROTMODE 
  6349.  
  6350.       QUIET 
  6351.  
  6352.       REDEFSOK 
  6353.  
  6354.       RESOURCE=resource_file 
  6355.  
  6356.       SHOWDEAD 
  6357.  
  6358.       STACK=n 
  6359.  
  6360.       START=symbol_name 
  6361.  
  6362.       STATICS 
  6363.  
  6364.       STUB=stub_name 
  6365.  
  6366.       SYMFILE[=symbol_file] 
  6367.  
  6368.       TOGGLERELOCS 
  6369.  
  6370.       [NO]UNDEFSOK 
  6371.  
  6372.       VERBOSE 
  6373.  
  6374.       VERSION=major[.minor] 
  6375.  
  6376.       VFREMOVAL 
  6377.  
  6378.  OPTLIB library_file{,library_file} 
  6379.  
  6380.  REFERENCE symbol_name{,symbol_name} 
  6381.  
  6382.  SEGMENT seg_desc{,seg_desc} 
  6383.  
  6384.  SORT [GLOBAL] [ALPHABETICAL] 
  6385.  
  6386.  STARTLINK 
  6387.  
  6388.  SYMTRACE symbol_name{,symbol_name} 
  6389.  
  6390.  SYSTEM BEGIN system_name {directive} END 
  6391.  
  6392.  SYSTEM system_name 
  6393.  
  6394.  # comment 
  6395.  
  6396.  @ directive_file 
  6397.  
  6398.  
  6399.  You can view all the directives specific to OS/2 executable files by simply 
  6400.  typing the following: 
  6401.  
  6402.  
  6403.     wlink ? os2 
  6404.  
  6405.  Notes: 
  6406.  
  6407.    1. If the file "wlink.hlp" is located in one of the paths specified in the 
  6408.       "PATH" environment variable, the contents of that file will be displayed 
  6409.       when the following command is issued. 
  6410.  
  6411.  
  6412.          wlink ? 
  6413.  
  6414.    2. If all of the directive information does not fit on the command line, 
  6415.       type the following. 
  6416.  
  6417.  
  6418.          wlink 
  6419.  
  6420.       The prompt "WLINK>" will appear on the next line.  You can enter as many 
  6421.       lines of directive information as required.  Press "Ctrl/Z" followed by 
  6422.       the "Enter" key to terminate the input of directive information if you 
  6423.       are running a DOS, OS/2 or Windows NT-hosted version of the Watcom 
  6424.       Linker.  Press "Ctrl/D" to terminate the input of directive information 
  6425.       if you are running a QNX-hosted version of the Watcom Linker. 
  6426.  
  6427.  
  6428. ΓòÉΓòÉΓòÉ 7.1. OS/2:  Dynamic Link Libraries ΓòÉΓòÉΓòÉ
  6429.  
  6430.  
  6431. The Watcom Linker can generate two forms of executable files; program modules 
  6432. and Dynamic Link Libraries.  A program module is the executable file that gets 
  6433. loaded by the operating system when you run your application.  A Dynamic Link 
  6434. Library is really a library of routines that are called by a program module but 
  6435. not linked into the program module. The executable code in a Dynamic Link 
  6436. Library is loaded by the operating system during the execution of a program 
  6437. module when a routine in the Dynamic Link Library is called. 
  6438.  
  6439. Program modules are contained in files whose name has a file extension of 
  6440. "exe".  Dynamic Link Libraries are contained in files whose name has a file 
  6441. extension of "dll".  The Watcom Linker "FORMAT" directive can be used to select 
  6442. the type of executable file to be generated. 
  6443.  
  6444. Let us consider some of the advantages of using Dynamic Link Libraries over 
  6445. standard libraries. 
  6446.  
  6447.    1. Functions in Dynamic Link Libraries are not linked into your program. 
  6448.       Only references to the functions in Dynamic Link Libraries are placed in 
  6449.       the program module.  These references are called import definitions.  As 
  6450.       a result, the linking time is reduced and disk space is saved.  If many 
  6451.       applications reference the same Dynamic Link Library, the saving in disk 
  6452.       space can be significant. 
  6453.  
  6454.    2. Since program modules only reference Dynamic Link Libraries and do not 
  6455.       contain the actual executable code, a Dynamic Link Library can be updated 
  6456.       without re-linking your application.  When your application is executed, 
  6457.       it will use the updated version of the Dynamic Link Library. 
  6458.  
  6459.    3. Dynamic Link Libraries also allow sharing of code and data between the 
  6460.       applications that use them.  If many applications that use the same 
  6461.       Dynamic Link Library are executing concurrently, the sharing of code and 
  6462.       data segments improves memory utilization. 
  6463.  
  6464.  
  6465. ΓòÉΓòÉΓòÉ 7.1.1. OS/2:  Creating a Dynamic Link Library ΓòÉΓòÉΓòÉ
  6466.  
  6467.  
  6468. To create a Dynamic Link Library, you must place the "DLL" keyword following 
  6469. the system name in the "SYSTEM" directive. 
  6470.  
  6471.  
  6472.    system system os2v2 dll 
  6473.  
  6474. In addition, you must specify which functions in the Dynamic Link Library are 
  6475. to be made available to applications which use it.  This is achieved by using 
  6476. the "EXPORT" directive for each function that can be called by an application. 
  6477.  
  6478. Dynamic Link Libraries can reference other Dynamic Link Libraries.  References 
  6479. to other Dynamic Link Libraries are resolved by specifying "IMPORT" directives 
  6480. or using import libraries. 
  6481.  
  6482.  
  6483. ΓòÉΓòÉΓòÉ 7.1.2. OS/2:  Using a Dynamic Link Library ΓòÉΓòÉΓòÉ
  6484.  
  6485.  
  6486. To use a Dynamic Link Library, you must tell the Watcom Linker which functions 
  6487. are contained in a Dynamic Link Library and the name of the Dynamic Link 
  6488. Library.  This is achieved in two ways. 
  6489.  
  6490. The first method is to use the "IMPORT" directive.  The "IMPORT" directive 
  6491. names the function and the Dynamic Link Library it belongs to so that the 
  6492. Watcom Linker can generate an import definition in the program module. 
  6493.  
  6494. The second method is to use import libraries.  An import library is a standard 
  6495. library which contains object modules with special object records that define 
  6496. the functions belonging to a Dynamic Link Library.  An import library is 
  6497. created from a Dynamic Link Library using the Watcom Library Manager.  The 
  6498. resulting import library can then be specified in a "LIBRARY" directive in the 
  6499. same way one would specify a standard library.  See the chapter entitled "The 
  6500. Watcom Library Manager" in the Watcom C/C++ Tools User's Guide or the Watcom 
  6501. FORTRAN 77 Tools User's Guide for more information on creating import 
  6502. libraries. 
  6503.  
  6504. Using an import library is the preferred method of providing references to 
  6505. functions in Dynamic Link Libraries.  When a Dynamic Link Library is modified, 
  6506. typically the import library corresponding to the modified Dynamic Link Library 
  6507. is updated to reflect the changes.  Hence, any directive file that specifies 
  6508. the import library in a "LIBRARY" directive need not be modified.  However, if 
  6509. you are using "IMPORT" directives, you may have to modify the "IMPORT" 
  6510. directives to reflect the changes in the Dynamic Link Library. 
  6511.  
  6512.  
  6513. ΓòÉΓòÉΓòÉ 7.2. OS/2:  Memory Layout ΓòÉΓòÉΓòÉ
  6514.  
  6515.  
  6516. The following describes the segment ordering of an application linked by the 
  6517. Watcom Linker.  Note that this assumes that the "DOSSEG" linker option has been 
  6518. specified. 
  6519.  
  6520.    1. all segments not belonging to group "DGROUP" with class "CODE" 
  6521.  
  6522.    2. all other segments not belonging to group "DGROUP" 
  6523.  
  6524.    3. all segments belonging to group "DGROUP" with class "BEGDATA" 
  6525.  
  6526.    4. all segments belonging to group "DGROUP" not with class "BEGDATA", "BSS" 
  6527.       or "STACK" 
  6528.  
  6529.    5. all segments belonging to group "DGROUP" with class "BSS" 
  6530.  
  6531.    6. all segments belonging to group "DGROUP" with class "STACK" 
  6532.  
  6533.  A special segment belonging to class "BEGDATA" is defined when linking with 
  6534.  Watcom run-time libraries.  This segment is initialized with the hexadecimal 
  6535.  byte pattern "01" and is the first segment in group "DGROUP" so that storing 
  6536.  data at location 0 can be detected. 
  6537.  
  6538.  Segments belonging to class "BSS" contain uninitialized data.  Note that this 
  6539.  only includes uninitialized data in segments belonging to group "DGROUP". 
  6540.  Segments belonging to class "STACK" are used to define the size of the stack 
  6541.  used for your application.  Segments belonging to the classes "BSS" and 
  6542.  "STACK" are last in the segment ordering so that uninitialized data need not 
  6543.  take space in the executable file. 
  6544.  
  6545.  
  6546. ΓòÉΓòÉΓòÉ 7.3. OS/2:  The Watcom Linker Memory Requirements ΓòÉΓòÉΓòÉ
  6547.  
  6548.  
  6549. The Watcom Linker uses all available memory when linking an application.  For 
  6550. DOS-hosted versions of the Watcom Linker, this includes expanded memory (EMS) 
  6551. and extended memory.  It is possible for the size of the image being linked to 
  6552. exceed the amount of memory available in your machine, particularly if the 
  6553. image file is to contain debugging information. For this reason, a temporary 
  6554. disk file is used when all available memory is used by the Watcom Linker. 
  6555.  
  6556. Normally, the temporary file is created in the default directory.  However, by 
  6557. defining the "tmp" environment variable to be a directory, you can tell the 
  6558. Watcom Linker where to create the temporary file.  This can be particularly 
  6559. useful if you have a RAM disk.  Consider the following definition of the "tmp" 
  6560. environment variable. 
  6561.  
  6562.  
  6563.    set tmp=\tmp 
  6564.  
  6565. The Watcom Linker will create the temporary file in the directory "\tmp". 
  6566.  
  6567.  
  6568. ΓòÉΓòÉΓòÉ 7.4. OS/2:  Converting Microsoft Response Files to Directive Files ΓòÉΓòÉΓòÉ
  6569.  
  6570.  
  6571. A utility called MS2WLINK can be used to convert Microsoft linker response 
  6572. files to Watcom Linker directive files.  The response files must correspond to 
  6573. the linker found in version 7 or earlier of Microsoft C.  Later versions of 
  6574. response files such as those used with Microsoft Visual C++ are not entirely 
  6575. supported. 
  6576.  
  6577. The same utility can also convert much of the content of IBM OS/2 LINK386 
  6578. response files since the syntax is similar. 
  6579.  
  6580. Input to MS2WLINK is processed in the same way as the Microsoft linker 
  6581. processes its input.  The difference is that MS2WLINK writes the corresponding 
  6582. Watcom Linker directive file to the standard output device instead of a 
  6583. creating an executable file.  The resulting output can be redirected to a disk 
  6584. file which can then be used as input to the Watcom Linker to produce an 
  6585. executable file. 
  6586.  
  6587. Suppose you have a Microsoft linker response file called "test.rsp".  You can 
  6588. convert this file to a Watcom Linker directive file by issuing the following 
  6589. command. 
  6590.  
  6591. Example: 
  6592.  
  6593.    ms2wlink @test.rsp >test.lnk 
  6594.  
  6595. You can now use the Watcom Linker to link your program by issuing the following 
  6596. command. 
  6597.  
  6598. Example: 
  6599.  
  6600.    wlink @test 
  6601.  
  6602. An alternative way to link your application with the Watcom Linker from a 
  6603. Microsoft response file is to issue the following command. 
  6604.  
  6605. Example: 
  6606.  
  6607.    ms2wlink @test.rsp | wlink 
  6608.  
  6609. Since the Watcom Linker gets its input from the standard input device, you do 
  6610. not have to create a Watcom Linker directive file to link your application. 
  6611.  
  6612. Note that MS2WLINK can also process module-definition files used for creating 
  6613. OS/2 applications. 
  6614.  
  6615.  
  6616. ΓòÉΓòÉΓòÉ 8. Phar Lap:  The Phar Lap Executable File Format ΓòÉΓòÉΓòÉ
  6617.  
  6618.  
  6619. This chapter deals specifically with aspects of Phar Lap 386|DOS-Extender 
  6620. executable files.  The Phar Lap executable file format will run under the 
  6621. following operating systems. 
  6622.  
  6623.    1. Phar Lap's 386|DOS-Extender 
  6624.  
  6625.    2. Watcom's 32-bit Windows supervisor (relocatable format only) 
  6626.  
  6627.  Input to the Watcom Linker is specified on the command line and can be 
  6628.  redirected to one or more files or environment strings.  The Watcom Linker 
  6629.  command line format is as follows. 
  6630.  
  6631.  
  6632.     WLINK {directive} 
  6633.  
  6634.  where directive is any of the following: 
  6635.  
  6636.  ALIAS alias_name=symbol_name{,alias_name=symbol_name} 
  6637.  
  6638.  DEBUG dbtype [dblist] | 
  6639.  
  6640.  DISABLE msg_num{,msg_num} 
  6641.  
  6642.  ENDLINK 
  6643.  
  6644.  FILE obj_spec{,obj_spec} 
  6645.  
  6646.  FORMAT PHARLAP [EXTENDED | REX | SEGMENTED] 
  6647.  
  6648.  LANGUAGE lang 
  6649.  
  6650.  LIBFILE obj_file{,obj_file} 
  6651.  
  6652.  LIBPATH path_name{;path_name} 
  6653.  
  6654.  LIBRARY library_file{,library_file} 
  6655.  
  6656.  MODFILE obj_file{,obj_file} 
  6657.  
  6658.  MODTRACE obj_module{,obj_module} 
  6659.  
  6660.  NAME exe_file 
  6661.  
  6662.  OPTION option{,option} 
  6663.  
  6664.       ARTIFICIAL 
  6665.  
  6666.       [NO]CACHE 
  6667.  
  6668.       [NO]CASEEXACT 
  6669.  
  6670.       CVPACK 
  6671.  
  6672.       DOSSEG 
  6673.  
  6674.       ELIMINATE 
  6675.  
  6676.       INCREMENTAL 
  6677.  
  6678.       MANGLEDNAMES 
  6679.  
  6680.       MAP[=map_file] 
  6681.  
  6682.       MAXDATA=n 
  6683.  
  6684.       MAXERRORS=n 
  6685.  
  6686.       MINDATA=n 
  6687.  
  6688.       NAMELEN=n 
  6689.  
  6690.       NODEFAULTLIBS 
  6691.  
  6692.       OFFSET=n 
  6693.  
  6694.       OSNAME='string' 
  6695.  
  6696.       QUIET 
  6697.  
  6698.       REDEFSOK 
  6699.  
  6700.       SHOWDEAD 
  6701.  
  6702.       STACK=n 
  6703.  
  6704.       START=symbol_name 
  6705.  
  6706.       STATICS 
  6707.  
  6708.       SYMFILE[=symbol_file] 
  6709.  
  6710.       [NO]UNDEFSOK 
  6711.  
  6712.       VERBOSE 
  6713.  
  6714.       VFREMOVAL 
  6715.  
  6716.  OPTLIB library_file{,library_file} 
  6717.  
  6718.  PATH path_name{;path_name} 
  6719.  
  6720.  REFERENCE symbol_name{,symbol_name} 
  6721.  
  6722.  RUNTIME run_option{,run_option} 
  6723.  
  6724.  SORT [GLOBAL] [ALPHABETICAL] 
  6725.  
  6726.  STARTLINK 
  6727.  
  6728.  SYMTRACE symbol_name{,symbol_name} 
  6729.  
  6730.  SYSTEM BEGIN system_name {directive} END 
  6731.  
  6732.  SYSTEM system_name 
  6733.  
  6734.  # comment 
  6735.  
  6736.  @ directive_file 
  6737.  
  6738.  
  6739.  You can view all the directives specific to Phar Lap 386|DOS-Extender 
  6740.  executable files by simply typing the following: 
  6741.  
  6742.  
  6743.     wlink ? phar 
  6744.  
  6745.  Notes: 
  6746.  
  6747.    1. If the file "wlink.hlp" is located in one of the paths specified in the 
  6748.       "PATH" environment variable, the contents of that file will be displayed 
  6749.       when the following command is issued. 
  6750.  
  6751.  
  6752.          wlink ? 
  6753.  
  6754.    2. If all of the directive information does not fit on the command line, 
  6755.       type the following. 
  6756.  
  6757.  
  6758.          wlink 
  6759.  
  6760.       The prompt "WLINK>" will appear on the next line.  You can enter as many 
  6761.       lines of directive information as required.  Press "Ctrl/Z" followed by 
  6762.       the "Enter" key to terminate the input of directive information if you 
  6763.       are running a DOS, OS/2 or Windows NT-hosted version of the Watcom 
  6764.       Linker.  Press "Ctrl/D" to terminate the input of directive information 
  6765.       if you are running a QNX-hosted version of the Watcom Linker. 
  6766.  
  6767.  
  6768. ΓòÉΓòÉΓòÉ 8.1. Phar Lap:  32-bit Protected-Mode Applications ΓòÉΓòÉΓòÉ
  6769.  
  6770.  
  6771. The Watcom Linker generates executable files that run under Phar Lap's 
  6772. 386|DOS-Extender.  386|DOS-Extender provides a 32-bit protected-mode 
  6773. environment for programs running under PC DOS.  Running in 32-bit protected 
  6774. mode allows your program to access all of the memory in your machine. 
  6775.  
  6776. Essentially, what 386|DOS-Extender does is provide an interface between your 
  6777. application and DOS running in real mode.  Whenever your program issues a 
  6778. software interrupt (DOS and BIOS system calls), 386|DOS-Extender intercepts the 
  6779. requests, transfers data between the protected-mode and real-mode address 
  6780. space, and calls the corresponding DOS system function running in real mode. 
  6781.  
  6782.  
  6783. ΓòÉΓòÉΓòÉ 8.2. Phar Lap:  Memory Usage ΓòÉΓòÉΓòÉ
  6784.  
  6785.  
  6786. When running a program under 386|DOS-Extender, memory for the program is 
  6787. allocated from conventional memory (memory below one megabyte) and extended 
  6788. memory.  Conventional memory is allocated from a block of memory that is 
  6789. obtained from DOS by 386|DOS-Extender at initialization time.  By default, all 
  6790. available memory is allocated at initialization time; no conventional memory 
  6791. remains free.  The "MINREAL" and "MAXREAL" options of the "RUNTIME" directive 
  6792. control the amount of conventional memory initially left free by 
  6793. 386|DOS-Extender. 
  6794.  
  6795. Part of the conventional memory allocated at initialization is required by 
  6796. 386|DOS-Extender.  The following is allocated from conventional memory for use 
  6797. by 386|DOS-Extender. 
  6798.  
  6799.    1. A data buffer is allocated and is used to pass data to DOS and BIOS 
  6800.       system functions.  The size allocated is controlled by the "MINIBUF" and 
  6801.       "MAXIBUF" options of the "RUNTIME" directive. 
  6802.  
  6803.    2. Stack space is allocated and is used for switching between 32-bit 
  6804.       protected mode and real mode.  The size allocated is controlled by the 
  6805.       "NISTACK" and "ISTKSIZE" options of the "RUNTIME" directive. 
  6806.  
  6807.    3. A call buffer is allocated and is used for passing data on function calls 
  6808.       between 32-bit protected mode and real mode.  The size allocated is 
  6809.       controlled by the "CALLBUFS" option of the "RUNTIME" directive. 
  6810.  
  6811.  When a program is loaded by 386|DOS-Extender, memory to hold the entire 
  6812.  program is allocated.  In addition, memory beyond the end of the program is 
  6813.  allocated for use by the program.  By default, all extra memory is allocated 
  6814.  when the program is loaded.  It is assumed that any memory not required by the 
  6815.  program is freed by the program.  The amount of memory allocated at the end of 
  6816.  the program is controlled by the "MINDATA" and "MAXDATA" options. 
  6817.  
  6818.  
  6819. ΓòÉΓòÉΓòÉ 8.3. Phar Lap:  Memory Layout ΓòÉΓòÉΓòÉ
  6820.  
  6821.  
  6822. The following describes the segment ordering of an application linked by the 
  6823. Watcom Linker.  Note that this assumes that the "DOSSEG" linker option has been 
  6824. specified. 
  6825.  
  6826.    1. all "USE16" segments.  These segments are present in applications that 
  6827.       execute in both real mode and protected mode.  They are first in the 
  6828.       segment ordering so that the "REALBREAK" option of the "RUNTIME" 
  6829.       directive can be used to separate the real-mode part of the application 
  6830.       from the protected-mode part of the application.  Currently, the 
  6831.       "RUNTIME" directive is valid for Phar Lap executables only. 
  6832.  
  6833.    2. all segments not belonging to group "DGROUP" with class "CODE" 
  6834.  
  6835.    3. all other segments not belonging to group "DGROUP" 
  6836.  
  6837.    4. all segments belonging to group "DGROUP" with class "BEGDATA" 
  6838.  
  6839.    5. all segments belonging to group "DGROUP" not with class "BEGDATA", "BSS" 
  6840.       or "STACK" 
  6841.  
  6842.    6. all segments belonging to group "DGROUP" with class "BSS" 
  6843.  
  6844.    7. all segments belonging to group "DGROUP" with class "STACK" 
  6845.  
  6846.  Segments belonging to class "BSS" contain uninitialized data.  Note that this 
  6847.  only includes uninitialized data in segments belonging to group "DGROUP". 
  6848.  Segments belonging to class "STACK" are used to define the size of the stack 
  6849.  used for your application.  Segments belonging to the classes "BSS" and 
  6850.  "STACK" are last in the segment ordering so that uninitialized data need not 
  6851.  take space in the executable file. 
  6852.  
  6853.  
  6854. ΓòÉΓòÉΓòÉ 8.4. Phar Lap:  The Watcom Linker Memory Requirements ΓòÉΓòÉΓòÉ
  6855.  
  6856.  
  6857. The Watcom Linker uses all available memory when linking an application.  For 
  6858. DOS-hosted versions of the Watcom Linker, this includes expanded memory (EMS) 
  6859. and extended memory.  It is possible for the size of the image being linked to 
  6860. exceed the amount of memory available in your machine, particularly if the 
  6861. image file is to contain debugging information. For this reason, a temporary 
  6862. disk file is used when all available memory is used by the Watcom Linker. 
  6863.  
  6864. Normally, the temporary file is created in the default directory.  However, by 
  6865. defining the "tmp" environment variable to be a directory, you can tell the 
  6866. Watcom Linker where to create the temporary file.  This can be particularly 
  6867. useful if you have a RAM disk.  Consider the following definition of the "tmp" 
  6868. environment variable. 
  6869.  
  6870.  
  6871.    set tmp=\tmp 
  6872.  
  6873. The Watcom Linker will create the temporary file in the directory "\tmp". 
  6874.  
  6875.  
  6876. ΓòÉΓòÉΓòÉ 9. QNX:  The QNX Executable File Format ΓòÉΓòÉΓòÉ
  6877.  
  6878.  
  6879. This chapter deals specifically with aspects of QNX executable files.  The QNX 
  6880. executable file format will only run under the QNX operating system. 
  6881.  
  6882. Input to the Watcom Linker is specified on the command line and can be 
  6883. redirected to one or more files or environment strings.  The Watcom Linker 
  6884. command line format is as follows. 
  6885.  
  6886.  
  6887.    wlink {directive} 
  6888.  
  6889. where directive is any of the following: 
  6890.  
  6891.  ALIAS symbol_name=symbol_name{,symbol_name=symbol_name} 
  6892.  
  6893.  DEBUG dbtype [dblist] | 
  6894.  
  6895.  DISABLE msg_num{,msg_num} 
  6896.  
  6897.  ENDLINK 
  6898.  
  6899.  FILE obj_spec{,obj_spec} 
  6900.  
  6901.  FORMAT QNX [FLAT] 
  6902.  
  6903.  LANGUAGE 
  6904.  
  6905.  LIBFILE obj_file{,obj_file} 
  6906.  
  6907.  LIBPATH path_name{:path_name} 
  6908.  
  6909.  LIBRARY library_file{,library_file} 
  6910.  
  6911.  MODFILE obj_file{,obj_file} 
  6912.  
  6913.  MODTRACE obj_spec{,obj_spec} 
  6914.  
  6915.  NAME exe_file 
  6916.  
  6917.  NEWSEGMENT 
  6918.  
  6919.  OPTION option{,option} 
  6920.  
  6921.       ARTIFICIAL 
  6922.  
  6923.       [NO]CACHE 
  6924.  
  6925.       [NO]CASEEXACT 
  6926.  
  6927.       CVPACK 
  6928.  
  6929.       DOSSEG 
  6930.  
  6931.       ELIMINATE 
  6932.  
  6933.       HEAPSIZE=n 
  6934.  
  6935.       INCREMENTAL 
  6936.  
  6937.       LINEARRELOCS 
  6938.  
  6939.       LONGLIVED 
  6940.  
  6941.       MANGLEDNAMES 
  6942.  
  6943.       MAP[=map_file] 
  6944.  
  6945.       MAXERRORS=n 
  6946.  
  6947.       NAMELEN=n 
  6948.  
  6949.       NODEFAULTLIBS 
  6950.  
  6951.       NORELOCS 
  6952.  
  6953.       OFFSET=n 
  6954.  
  6955.       OSNAME='string' 
  6956.  
  6957.       PACKCODE=n 
  6958.  
  6959.       PACKDATA=n 
  6960.  
  6961.       PRIVILEGE=n 
  6962.  
  6963.       QUIET 
  6964.  
  6965.       REDEFSOK 
  6966.  
  6967.       RESOURCE[=resource_file | 'string'] 
  6968.  
  6969.       SHOWDEAD 
  6970.  
  6971.       STACK=n 
  6972.  
  6973.       START=symbol_name 
  6974.  
  6975.       STATICS 
  6976.  
  6977.       SYMFILE[=symbol_file] 
  6978.  
  6979.       [NO]UNDEFSOK 
  6980.  
  6981.       VERBOSE 
  6982.  
  6983.       VFREMOVAL 
  6984.  
  6985.  OPTLIB library_file{,library_file} 
  6986.  
  6987.  PATH path_name{:path_name} 
  6988.  
  6989.  REFERENCE symbol_name{,symbol_name} 
  6990.  
  6991.  SEGMENT seg_desc{,seg_desc} 
  6992.  
  6993.  SORT [GLOBAL] [ALPHABETICAL] 
  6994.  
  6995.  STARTLINK 
  6996.  
  6997.  SYMTRACE symbol_name{,symbol_name} 
  6998.  
  6999.  SYSTEM BEGIN system_name {directive} END 
  7000.  
  7001.  SYSTEM system_name 
  7002.  
  7003.  # comment 
  7004.  
  7005.  @ directive_file 
  7006.  
  7007.  
  7008.  You can view all the directives specific to QNX executable files by simply 
  7009.  typing the following: 
  7010.  
  7011.  
  7012.     wlink ? qnx 
  7013.  Notes: 
  7014.  
  7015.    1. If the file /etc/wlink.hlp exists, the contents of that file will be 
  7016.       displayed when the following command is issued. 
  7017.  
  7018.  
  7019.          wlink ? 
  7020.  
  7021.    2. If all of the directive information does not fit on the command line, 
  7022.       type the following. 
  7023.  
  7024.  
  7025.          wlink 
  7026.  
  7027.       The prompt "WLINK>" will appear on the next line.  You can enter as many 
  7028.       lines of directive information as required.  Press "Ctrl/Z" followed by 
  7029.       the "Enter" key to terminate the input of directive information if you 
  7030.       are running a DOS, OS/2 or Windows NT-hosted version of the Watcom 
  7031.       Linker.  Press "Ctrl/D" to terminate the input of directive information 
  7032.       if you are running a QNX-hosted version of the Watcom Linker. 
  7033.  
  7034.  
  7035. ΓòÉΓòÉΓòÉ 9.1. QNX:  Memory Layout ΓòÉΓòÉΓòÉ
  7036.  
  7037.  
  7038. The following describes the segment ordering of an application linked by the 
  7039. Watcom Linker.  Note that this assumes that the "DOSSEG" linker option has been 
  7040. specified. 
  7041.  
  7042.    1. all segments not belonging to group "DGROUP" with class "CODE" 
  7043.  
  7044.    2. all other segments not belonging to group "DGROUP" 
  7045.  
  7046.    3. all segments belonging to group "DGROUP" with class "BEGDATA" 
  7047.  
  7048.    4. all segments belonging to group "DGROUP" not with class "BEGDATA", "BSS" 
  7049.       or "STACK" 
  7050.  
  7051.    5. all segments belonging to group "DGROUP" with class "BSS" 
  7052.  
  7053.    6. all segments belonging to group "DGROUP" with class "STACK" 
  7054.  
  7055.  A special segment belonging to class "BEGDATA" is defined when linking with 
  7056.  Watcom run-time libraries.  This segment is initialized with the hexadecimal 
  7057.  byte pattern "01" and is the first segment in group "DGROUP" so that storing 
  7058.  data at location 0 can be detected. 
  7059.  
  7060.  Segments belonging to class "BSS" contain uninitialized data.  Note that this 
  7061.  only includes uninitialized data in segments belonging to group "DGROUP". 
  7062.  Segments belonging to class "STACK" are used to define the size of the stack 
  7063.  used for your application.  Segments belonging to the classes "BSS" and 
  7064.  "STACK" are last in the segment ordering so that uninitialized data need not 
  7065.  take space in the executable file. 
  7066.  
  7067.  
  7068. ΓòÉΓòÉΓòÉ 9.2. QNX:  The Watcom Linker Memory Requirements ΓòÉΓòÉΓòÉ
  7069.  
  7070.  
  7071. The Watcom Linker uses all available memory when linking an application.  For 
  7072. DOS-hosted versions of the Watcom Linker, this includes expanded memory (EMS) 
  7073. and extended memory.  It is possible for the size of the image being linked to 
  7074. exceed the amount of memory available in your machine, particularly if the 
  7075. image file is to contain debugging information. For this reason, a temporary 
  7076. disk file is used when all available memory is used by the Watcom Linker. 
  7077.  
  7078. Normally, the temporary file is created in the current working directory. 
  7079. However, by defining the "TMPDIR" environment variable to be a directory, you 
  7080. can tell the Watcom Linker where to create the temporary file.  This can be 
  7081. particularly useful if you have a RAM disk.  Consider the following definition 
  7082. of the "TMPDIR" environment variable. 
  7083.  
  7084.  
  7085.    export TMPDIR=/tmp 
  7086.  
  7087. The Watcom Linker will create the temporary file in the directory "/tmp". 
  7088.  
  7089.  
  7090. ΓòÉΓòÉΓòÉ 10. Win16:  The Win16 Executable and DLL File Formats ΓòÉΓòÉΓòÉ
  7091.  
  7092.  
  7093. This chapter deals specifically with aspects of Win16 executable files.  The 
  7094. Win16 executable file format will run under Windows 3.x, Windows 95, and 
  7095. Windows NT. 
  7096.  
  7097. Input to the Watcom Linker is specified on the command line and can be 
  7098. redirected to one or more files or environment strings.  The Watcom Linker 
  7099. command line format is as follows. 
  7100.  
  7101.  
  7102.    WLINK {directive} 
  7103.  
  7104. where directive is any of the following: 
  7105.  
  7106.  ALIAS alias_name=symbol_name{,alias_name=symbol_name} 
  7107.  
  7108.  ANONYMOUSEXPORT export{,export} | =lbc_file 
  7109.  
  7110.  DEBUG dbtype [dblist] | 
  7111.  
  7112.  DISABLE msg_num{,msg_num} 
  7113.  
  7114.  ENDLINK 
  7115.  
  7116.  EXPORT export{,export} 
  7117.  
  7118.  EXPORT =lbc_file 
  7119.  
  7120.  FILE obj_spec{,obj_spec} 
  7121.  
  7122.  FORMAT WINDOWS [dll_form] [MEMORY] [FONT] 
  7123.  
  7124.  IMPORT import{,import} 
  7125.  
  7126.  LANGUAGE lang 
  7127.  
  7128.  LIBFILE obj_file{,obj_file} 
  7129.  
  7130.  LIBPATH path_name{;path_name} 
  7131.  
  7132.  LIBRARY library_file{,library_file} 
  7133.  
  7134.  MODFILE obj_file{,obj_file} 
  7135.  
  7136.  MODTRACE obj_module{,obj_module} 
  7137.  
  7138.  NAME exe_file 
  7139.  
  7140.  NEWSEGMENT 
  7141.  
  7142.  PATH path_name{;path_name} 
  7143.  
  7144.  OPTION option{,option} 
  7145.  
  7146.       ALIGNMENT=n 
  7147.  
  7148.       ARTIFICIAL 
  7149.  
  7150.       [NO]CACHE 
  7151.  
  7152.       [NO]CASEEXACT 
  7153.  
  7154.       CVPACK 
  7155.  
  7156.       DESCRIPTION 'string' 
  7157.  
  7158.       DOSSEG 
  7159.  
  7160.       ELIMINATE 
  7161.  
  7162.       HEAPSIZE=n 
  7163.  
  7164.       IMPFILE[=imp_file] 
  7165.  
  7166.       IMPLIB[=imp_lib] 
  7167.  
  7168.       INCREMENTAL 
  7169.  
  7170.       MANGLEDNAMES 
  7171.  
  7172.       MANYAUTODATA 
  7173.  
  7174.       MAP[=map_file] 
  7175.  
  7176.       MAXERRORS=n 
  7177.  
  7178.       MODNAME=module_name 
  7179.  
  7180.       NAMELEN=n 
  7181.  
  7182.       NOAUTODATA 
  7183.  
  7184.       NODEFAULTLIBS 
  7185.  
  7186.       OLDLIBRARY=dll_name 
  7187.  
  7188.       ONEAUTODATA 
  7189.  
  7190.       OSNAME='string' 
  7191.  
  7192.       PACKCODE=n 
  7193.  
  7194.       PACKDATA=n 
  7195.  
  7196.       QUIET 
  7197.  
  7198.       REDEFSOK 
  7199.  
  7200.       RESOURCE=resource_file 
  7201.  
  7202.       RWRELOCCHECK 
  7203.  
  7204.       SHOWDEAD 
  7205.  
  7206.       STACK=n 
  7207.  
  7208.       START=symbol_name 
  7209.  
  7210.       STATICS 
  7211.  
  7212.       STUB=stub_name 
  7213.  
  7214.       SYMFILE[=symbol_file] 
  7215.  
  7216.       [NO]UNDEFSOK 
  7217.  
  7218.       VERBOSE 
  7219.  
  7220.       VERSION=major[.minor] 
  7221.  
  7222.       VFREMOVAL 
  7223.  
  7224.  OPTLIB library_file{,library_file} 
  7225.  
  7226.  REFERENCE symbol_name{,symbol_name} 
  7227.  
  7228.  SEGMENT seg_desc{,seg_desc} 
  7229.  
  7230.  SORT [GLOBAL] [ALPHABETICAL] 
  7231.  
  7232.  STARTLINK 
  7233.  
  7234.  SYMTRACE symbol_name{,symbol_name} 
  7235.  
  7236.  SYSTEM BEGIN system_name {directive} END 
  7237.  
  7238.  SYSTEM system_name 
  7239.  
  7240.  # comment 
  7241.  
  7242.  @ directive_file 
  7243.  
  7244.  
  7245.  You can view all the directives specific to Win16 executable files by simply 
  7246.  typing the following: 
  7247.  
  7248.  
  7249.     wlink ? win 
  7250.  
  7251.  Notes: 
  7252.  
  7253.    1. If the file "wlink.hlp" is located in one of the paths specified in the 
  7254.       "PATH" environment variable, the contents of that file will be displayed 
  7255.       when the following command is issued. 
  7256.  
  7257.  
  7258.          wlink ? 
  7259.  
  7260.    2. If all of the directive information does not fit on the command line, 
  7261.       type the following. 
  7262.  
  7263.  
  7264.          wlink 
  7265.  
  7266.       The prompt "WLINK>" will appear on the next line.  You can enter as many 
  7267.       lines of directive information as required.  Press "Ctrl/Z" followed by 
  7268.       the "Enter" key to terminate the input of directive information if you 
  7269.       are running a DOS, OS/2 or Windows NT-hosted version of the Watcom 
  7270.       Linker.  Press "Ctrl/D" to terminate the input of directive information 
  7271.       if you are running a QNX-hosted version of the Watcom Linker. 
  7272.  
  7273.  
  7274. ΓòÉΓòÉΓòÉ 10.1. Win16:  Fixed and Moveable Segments ΓòÉΓòÉΓòÉ
  7275.  
  7276.  
  7277. All segments have attributes that tell Windows how to manage the segment.  One 
  7278. of these attributes specifies whether the segment is fixed or moveable. 
  7279. Moveable segments can be moved in memory to satisfy other memory requests. 
  7280. When a segment is moved, all near pointers to that segment are still valid 
  7281. since a near pointer references memory relative to the start of the segment. 
  7282. However, far pointers are no longer valid once a segment has been moved.  Fixed 
  7283. segments, on the other hand, cannot be moved in memory.  A segment must be 
  7284. fixed if there exists far pointers to that segment that Windows cannot adjust 
  7285. if that segment were moved. 
  7286.  
  7287. This is a memory-management issue for real-mode Windows only.  However, if a 
  7288. DLL is marked as "fixed", Windows 3.x will place it in the lower 640K real-mode 
  7289. memory (regardless of the mode in which Windows 3.x is running).  Since the 
  7290. lower 640K is a limited resource, you normally would want a DLL to be marked as 
  7291. "moveable". 
  7292.  
  7293. Most segments, including code and data segments, are moveable.  Some exceptions 
  7294. exist.  If your program contains a far pointer, the segment which it references 
  7295. must be fixed.  If it were moveable, the segment address portion of the far 
  7296. pointer would be invalid when Windows moved the segment. 
  7297.  
  7298. All non-Windows programs are assigned fixed segments when they run under 
  7299. Windows.  These segments must be fixed since there is no information in the 
  7300. executable file that describes how segments are referenced.  Whenever possible, 
  7301. your application should consist of moveable segments since fixed segments can 
  7302. cause memory management problems. 
  7303.  
  7304.  
  7305. ΓòÉΓòÉΓòÉ 10.2. Win16:  Discardable Segments ΓòÉΓòÉΓòÉ
  7306.  
  7307.  
  7308. Moveable segments can also be discardable.  Memory allocated to a discardable 
  7309. segment can be freed and used for other memory requests.  A "least recently 
  7310. used" (LRU) algorithm is used to determine which segment to discard when more 
  7311. memory is required. 
  7312.  
  7313. Discardable segments are usually segments that do not change once they are 
  7314. loaded into memory.  For example, code segments are discardable since programs 
  7315. do not usually modify their code segments.  When a segment is discarded, it can 
  7316. be reloaded into memory by accessing the executable file. 
  7317.  
  7318. Discardable segments must be moveable since they can be reloaded into a 
  7319. different area in memory than the area they previously occupied.  Note that 
  7320. moveable segments need not be discardable.  Obviously, data segments that 
  7321. contain read/write data cannot be discarded. 
  7322.  
  7323.  
  7324. ΓòÉΓòÉΓòÉ 10.3. Win16:  Dynamic Link Libraries ΓòÉΓòÉΓòÉ
  7325.  
  7326.  
  7327. The Watcom Linker can generate two forms of executable files; program modules 
  7328. and Dynamic Link Libraries.  A program module is the executable file that gets 
  7329. loaded by the operating system when you run your application.  A Dynamic Link 
  7330. Library is really a library of routines that are called by a program module but 
  7331. not linked into the program module. The executable code in a Dynamic Link 
  7332. Library is loaded by the operating system during the execution of a program 
  7333. module when a routine in the Dynamic Link Library is called. 
  7334.  
  7335. Program modules are contained in files whose name has a file extension of 
  7336. "exe".  Dynamic Link Libraries are contained in files whose name has a file 
  7337. extension of "dll".  The Watcom Linker "FORMAT" directive can be used to select 
  7338. the type of executable file to be generated. 
  7339.  
  7340. Let us consider some of the advantages of using Dynamic Link Libraries over 
  7341. standard libraries. 
  7342.  
  7343.    1. Functions in Dynamic Link Libraries are not linked into your program. 
  7344.       Only references to the functions in Dynamic Link Libraries are placed in 
  7345.       the program module.  These references are called import definitions.  As 
  7346.       a result, the linking time is reduced and disk space is saved.  If many 
  7347.       applications reference the same Dynamic Link Library, the saving in disk 
  7348.       space can be significant. 
  7349.  
  7350.    2. Since program modules only reference Dynamic Link Libraries and do not 
  7351.       contain the actual executable code, a Dynamic Link Library can be updated 
  7352.       without re-linking your application.  When your application is executed, 
  7353.       it will use the updated version of the Dynamic Link Library. 
  7354.  
  7355.    3. Dynamic Link Libraries also allow sharing of code and data between the 
  7356.       applications that use them.  If many applications that use the same 
  7357.       Dynamic Link Library are executing concurrently, the sharing of code and 
  7358.       data segments improves memory utilization. 
  7359.  
  7360.  
  7361. ΓòÉΓòÉΓòÉ 10.3.1. Win16:  Creating a Dynamic Link Library ΓòÉΓòÉΓòÉ
  7362.  
  7363.  
  7364. To create a Dynamic Link Library, you must place the "DLL" keyword following 
  7365. the system name in the "SYSTEM" directive. 
  7366.  
  7367.  
  7368.    system system windows_dll 
  7369.  
  7370. In addition, you must specify which functions in the Dynamic Link Library are 
  7371. to be made available to applications which use it.  This is achieved by using 
  7372. the "EXPORT" directive for each function that can be called by an application. 
  7373.  
  7374. Dynamic Link Libraries can reference other Dynamic Link Libraries.  References 
  7375. to other Dynamic Link Libraries are resolved by specifying "IMPORT" directives 
  7376. or using import libraries. 
  7377.  
  7378.  
  7379. ΓòÉΓòÉΓòÉ 10.3.2. Win16:  Using a Dynamic Link Library ΓòÉΓòÉΓòÉ
  7380.  
  7381.  
  7382. To use a Dynamic Link Library, you must tell the Watcom Linker which functions 
  7383. are contained in a Dynamic Link Library and the name of the Dynamic Link 
  7384. Library.  This is achieved in two ways. 
  7385.  
  7386. The first method is to use the "IMPORT" directive.  The "IMPORT" directive 
  7387. names the function and the Dynamic Link Library it belongs to so that the 
  7388. Watcom Linker can generate an import definition in the program module. 
  7389.  
  7390. The second method is to use import libraries.  An import library is a standard 
  7391. library which contains object modules with special object records that define 
  7392. the functions belonging to a Dynamic Link Library.  An import library is 
  7393. created from a Dynamic Link Library using the Watcom Library Manager.  The 
  7394. resulting import library can then be specified in a "LIBRARY" directive in the 
  7395. same way one would specify a standard library.  See the chapter entitled "The 
  7396. Watcom Library Manager" in the Watcom C/C++ Tools User's Guide or the Watcom 
  7397. FORTRAN 77 Tools User's Guide for more information on creating import 
  7398. libraries. 
  7399.  
  7400. Using an import library is the preferred method of providing references to 
  7401. functions in Dynamic Link Libraries.  When a Dynamic Link Library is modified, 
  7402. typically the import library corresponding to the modified Dynamic Link Library 
  7403. is updated to reflect the changes.  Hence, any directive file that specifies 
  7404. the import library in a "LIBRARY" directive need not be modified.  However, if 
  7405. you are using "IMPORT" directives, you may have to modify the "IMPORT" 
  7406. directives to reflect the changes in the Dynamic Link Library. 
  7407.  
  7408.  
  7409. ΓòÉΓòÉΓòÉ 10.4. Win16:  Memory Layout ΓòÉΓòÉΓòÉ
  7410.  
  7411.  
  7412. The following describes the segment ordering of an application linked by the 
  7413. Watcom Linker.  Note that this assumes that the "DOSSEG" linker option has been 
  7414. specified. 
  7415.  
  7416.    1. all segments not belonging to group "DGROUP" with class "CODE" 
  7417.  
  7418.    2. all other segments not belonging to group "DGROUP" 
  7419.  
  7420.    3. all segments belonging to group "DGROUP" with class "BEGDATA" 
  7421.  
  7422.    4. all segments belonging to group "DGROUP" not with class "BEGDATA", "BSS" 
  7423.       or "STACK" 
  7424.  
  7425.    5. all segments belonging to group "DGROUP" with class "BSS" 
  7426.  
  7427.    6. all segments belonging to group "DGROUP" with class "STACK" 
  7428.  
  7429.  A special segment belonging to class "BEGDATA" is defined when linking with 
  7430.  Watcom run-time libraries.  This segment is initialized with the hexadecimal 
  7431.  byte pattern "01" and is the first segment in group "DGROUP" so that storing 
  7432.  data at location 0 can be detected. 
  7433.  
  7434.  Segments belonging to class "BSS" contain uninitialized data.  Note that this 
  7435.  only includes uninitialized data in segments belonging to group "DGROUP". 
  7436.  Segments belonging to class "STACK" are used to define the size of the stack 
  7437.  used for your application.  Segments belonging to the classes "BSS" and 
  7438.  "STACK" are last in the segment ordering so that uninitialized data need not 
  7439.  take space in the executable file. 
  7440.  
  7441.  
  7442. ΓòÉΓòÉΓòÉ 10.5. Win16:  The Watcom Linker Memory Requirements ΓòÉΓòÉΓòÉ
  7443.  
  7444.  
  7445. The Watcom Linker uses all available memory when linking an application.  For 
  7446. DOS-hosted versions of the Watcom Linker, this includes expanded memory (EMS) 
  7447. and extended memory.  It is possible for the size of the image being linked to 
  7448. exceed the amount of memory available in your machine, particularly if the 
  7449. image file is to contain debugging information. For this reason, a temporary 
  7450. disk file is used when all available memory is used by the Watcom Linker. 
  7451.  
  7452. Normally, the temporary file is created in the default directory.  However, by 
  7453. defining the "tmp" environment variable to be a directory, you can tell the 
  7454. Watcom Linker where to create the temporary file.  This can be particularly 
  7455. useful if you have a RAM disk.  Consider the following definition of the "tmp" 
  7456. environment variable. 
  7457.  
  7458.  
  7459.    set tmp=\tmp 
  7460.  
  7461. The Watcom Linker will create the temporary file in the directory "\tmp". 
  7462.  
  7463.  
  7464. ΓòÉΓòÉΓòÉ 10.6. Win16:  Converting Microsoft Response Files to Directive Files ΓòÉΓòÉΓòÉ
  7465.  
  7466.  
  7467. A utility called MS2WLINK can be used to convert Microsoft linker response 
  7468. files to Watcom Linker directive files.  The response files must correspond to 
  7469. the linker found in version 7 or earlier of Microsoft C.  Later versions of 
  7470. response files such as those used with Microsoft Visual C++ are not entirely 
  7471. supported. 
  7472.  
  7473. The same utility can also convert much of the content of IBM OS/2 LINK386 
  7474. response files since the syntax is similar. 
  7475.  
  7476. Input to MS2WLINK is processed in the same way as the Microsoft linker 
  7477. processes its input.  The difference is that MS2WLINK writes the corresponding 
  7478. Watcom Linker directive file to the standard output device instead of a 
  7479. creating an executable file.  The resulting output can be redirected to a disk 
  7480. file which can then be used as input to the Watcom Linker to produce an 
  7481. executable file. 
  7482.  
  7483. Suppose you have a Microsoft linker response file called "test.rsp".  You can 
  7484. convert this file to a Watcom Linker directive file by issuing the following 
  7485. command. 
  7486.  
  7487. Example: 
  7488.  
  7489.    ms2wlink @test.rsp >test.lnk 
  7490.  
  7491. You can now use the Watcom Linker to link your program by issuing the following 
  7492. command. 
  7493.  
  7494. Example: 
  7495.  
  7496.    wlink @test 
  7497.  
  7498. An alternative way to link your application with the Watcom Linker from a 
  7499. Microsoft response file is to issue the following command. 
  7500.  
  7501. Example: 
  7502.  
  7503.    ms2wlink @test.rsp | wlink 
  7504.  
  7505. Since the Watcom Linker gets its input from the standard input device, you do 
  7506. not have to create a Watcom Linker directive file to link your application. 
  7507.  
  7508. Note that MS2WLINK can also process module-definition files used for creating 
  7509. OS/2 applications. 
  7510.  
  7511.  
  7512. ΓòÉΓòÉΓòÉ 11. Win32:  The Win32 Executable and DLL File Formats ΓòÉΓòÉΓòÉ
  7513.  
  7514.  
  7515. This chapter deals specifically with aspects of Win32 executable files.  The 
  7516. Win32 executable file format will run under Windows 95, Windows NT, and Phar 
  7517. Lap's TNT DOS extender.  It may also run under Windows 3.x using the Win32S 
  7518. subsystem (you are restricted to a subset of the Win32 API). 
  7519.  
  7520. Input to the Watcom Linker is specified on the command line and can be 
  7521. redirected to one or more files or environment strings.  The Watcom Linker 
  7522. command line format is as follows. 
  7523.  
  7524.  
  7525.    WLINK {directive} 
  7526.  
  7527. where directive is any of the following: 
  7528.  
  7529.  ALIAS alias_name=symbol_name{,alias_name=symbol_name} 
  7530.  
  7531.  ANONYMOUSEXPORT export{,export} | =lbc_file 
  7532.  
  7533.  COMMIT mem_type 
  7534.  
  7535.  DEBUG dbtype [dblist] | 
  7536.  
  7537.  DISABLE msg_num{,msg_num} 
  7538.  
  7539.  ENDLINK 
  7540.  
  7541.  EXPORT export{,export} 
  7542.  
  7543.  EXPORT =lbc_file 
  7544.  
  7545.  FILE obj_spec{,obj_spec} 
  7546.  
  7547.  FORMAT WINDOWS NT [TNT] [dll_form] 
  7548.  
  7549.  IMPORT import{,import} 
  7550.  
  7551.  LANGUAGE lang 
  7552.  
  7553.  LIBFILE obj_file{,obj_file} 
  7554.  
  7555.  LIBPATH path_name{;path_name} 
  7556.  
  7557.  LIBRARY library_file{,library_file} 
  7558.  
  7559.  MODFILE obj_file{,obj_file} 
  7560.  
  7561.  MODTRACE obj_module{,obj_module} 
  7562.  
  7563.  NAME exe_file 
  7564.  
  7565.  PATH path_name{;path_name} 
  7566.  
  7567.  OPTION option{,option} 
  7568.  
  7569.       ALIGNMENT=n 
  7570.  
  7571.       ARTIFICIAL 
  7572.  
  7573.       [NO]CACHE 
  7574.  
  7575.       [NO]CASEEXACT 
  7576.  
  7577.       CVPACK 
  7578.  
  7579.       DESCRIPTION 'string' 
  7580.  
  7581.       DOSSEG 
  7582.  
  7583.       ELIMINATE 
  7584.  
  7585.       HEAPSIZE=n 
  7586.  
  7587.       IMPFILE[=imp_file] 
  7588.  
  7589.       IMPLIB[=imp_lib] 
  7590.  
  7591.       INCREMENTAL 
  7592.  
  7593.       MANGLEDNAMES 
  7594.  
  7595.       MAP[=map_file] 
  7596.  
  7597.       MAXERRORS=n 
  7598.  
  7599.       MODNAME=module_name 
  7600.  
  7601.       NAMELEN=n 
  7602.  
  7603.       NODEFAULTLIBS 
  7604.  
  7605.       NORELOCS 
  7606.  
  7607.       NOSTDCALL 
  7608.  
  7609.       OBJALIGN=n 
  7610.  
  7611.       OFFSET 
  7612.  
  7613.       OLDLIBRARY=dll_name 
  7614.  
  7615.       OSNAME='string' 
  7616.  
  7617.       QUIET 
  7618.  
  7619.       REDEFSOK 
  7620.  
  7621.       RESOURCE=resource_file 
  7622.  
  7623.       SHOWDEAD 
  7624.  
  7625.       STACK=n 
  7626.  
  7627.       START=symbol_name 
  7628.  
  7629.       STATICS 
  7630.  
  7631.       STUB=stub_name 
  7632.  
  7633.       SYMFILE[=symbol_file] 
  7634.  
  7635.       [NO]UNDEFSOK 
  7636.  
  7637.       VERBOSE 
  7638.  
  7639.       VERSION=major[.minor] 
  7640.  
  7641.       VFREMOVAL 
  7642.  
  7643.  OPTLIB library_file{,library_file} 
  7644.  
  7645.  REFERENCE symbol_name{,symbol_name} 
  7646.  
  7647.  RUNTIME run_option 
  7648.  
  7649.  SEGMENT seg_desc{,seg_desc} 
  7650.  
  7651.  SORT [GLOBAL] [ALPHABETICAL] 
  7652.  
  7653.  STARTLINK 
  7654.  
  7655.  SYMTRACE symbol_name{,symbol_name} 
  7656.  
  7657.  SYSTEM BEGIN system_name {directive} END 
  7658.  
  7659.  SYSTEM system_name 
  7660.  
  7661.  # comment 
  7662.  
  7663.  @ directive_file 
  7664.  
  7665.  
  7666.  You can view all the directives specific to Win32 executable files by simply 
  7667.  typing the following: 
  7668.  
  7669.  
  7670.     wlink ? nt 
  7671.  
  7672.  Notes: 
  7673.  
  7674.    1. If the file "wlink.hlp" is located in one of the paths specified in the 
  7675.       "PATH" environment variable, the contents of that file will be displayed 
  7676.       when the following command is issued. 
  7677.  
  7678.  
  7679.          wlink ? 
  7680.  
  7681.    2. If all of the directive information does not fit on the command line, 
  7682.       type the following. 
  7683.  
  7684.  
  7685.          wlink 
  7686.  
  7687.       The prompt "WLINK>" will appear on the next line.  You can enter as many 
  7688.       lines of directive information as required.  Press "Ctrl/Z" followed by 
  7689.       the "Enter" key to terminate the input of directive information if you 
  7690.       are running a DOS, OS/2 or Windows NT-hosted version of the Watcom 
  7691.       Linker.  Press "Ctrl/D" to terminate the input of directive information 
  7692.       if you are running a QNX-hosted version of the Watcom Linker. 
  7693.  
  7694.  
  7695. ΓòÉΓòÉΓòÉ 11.1. Win32:  Dynamic Link Libraries ΓòÉΓòÉΓòÉ
  7696.  
  7697.  
  7698. The Watcom Linker can generate two forms of executable files; program modules 
  7699. and Dynamic Link Libraries.  A program module is the executable file that gets 
  7700. loaded by the operating system when you run your application.  A Dynamic Link 
  7701. Library is really a library of routines that are called by a program module but 
  7702. not linked into the program module. The executable code in a Dynamic Link 
  7703. Library is loaded by the operating system during the execution of a program 
  7704. module when a routine in the Dynamic Link Library is called. 
  7705.  
  7706. Program modules are contained in files whose name has a file extension of 
  7707. "exe".  Dynamic Link Libraries are contained in files whose name has a file 
  7708. extension of "dll".  The Watcom Linker "FORMAT" directive can be used to select 
  7709. the type of executable file to be generated. 
  7710.  
  7711. Let us consider some of the advantages of using Dynamic Link Libraries over 
  7712. standard libraries. 
  7713.  
  7714.    1. Functions in Dynamic Link Libraries are not linked into your program. 
  7715.       Only references to the functions in Dynamic Link Libraries are placed in 
  7716.       the program module.  These references are called import definitions.  As 
  7717.       a result, the linking time is reduced and disk space is saved.  If many 
  7718.       applications reference the same Dynamic Link Library, the saving in disk 
  7719.       space can be significant. 
  7720.  
  7721.    2. Since program modules only reference Dynamic Link Libraries and do not 
  7722.       contain the actual executable code, a Dynamic Link Library can be updated 
  7723.       without re-linking your application.  When your application is executed, 
  7724.       it will use the updated version of the Dynamic Link Library. 
  7725.  
  7726.    3. Dynamic Link Libraries also allow sharing of code and data between the 
  7727.       applications that use them.  If many applications that use the same 
  7728.       Dynamic Link Library are executing concurrently, the sharing of code and 
  7729.       data segments improves memory utilization. 
  7730.  
  7731.  
  7732. ΓòÉΓòÉΓòÉ 11.1.1. Win32:  Creating a Dynamic Link Library ΓòÉΓòÉΓòÉ
  7733.  
  7734.  
  7735. To create a Dynamic Link Library, you must place the "DLL" keyword following 
  7736. the system name in the "SYSTEM" directive. 
  7737.  
  7738.  
  7739.    system system nt_win dll 
  7740.  
  7741. In addition, you must specify which functions in the Dynamic Link Library are 
  7742. to be made available to applications which use it.  This is achieved by using 
  7743. the "EXPORT" directive for each function that can be called by an application. 
  7744.  
  7745. Dynamic Link Libraries can reference other Dynamic Link Libraries.  References 
  7746. to other Dynamic Link Libraries are resolved by specifying "IMPORT" directives 
  7747. or using import libraries. 
  7748.  
  7749.  
  7750. ΓòÉΓòÉΓòÉ 11.1.2. Win32:  Using a Dynamic Link Library ΓòÉΓòÉΓòÉ
  7751.  
  7752.  
  7753. To use a Dynamic Link Library, you must tell the Watcom Linker which functions 
  7754. are contained in a Dynamic Link Library and the name of the Dynamic Link 
  7755. Library.  This is achieved in two ways. 
  7756.  
  7757. The first method is to use the "IMPORT" directive.  The "IMPORT" directive 
  7758. names the function and the Dynamic Link Library it belongs to so that the 
  7759. Watcom Linker can generate an import definition in the program module. 
  7760.  
  7761. The second method is to use import libraries.  An import library is a standard 
  7762. library which contains object modules with special object records that define 
  7763. the functions belonging to a Dynamic Link Library.  An import library is 
  7764. created from a Dynamic Link Library using the Watcom Library Manager.  The 
  7765. resulting import library can then be specified in a "LIBRARY" directive in the 
  7766. same way one would specify a standard library.  See the chapter entitled "The 
  7767. Watcom Library Manager" in the Watcom C/C++ Tools User's Guide or the Watcom 
  7768. FORTRAN 77 Tools User's Guide for more information on creating import 
  7769. libraries. 
  7770.  
  7771. Using an import library is the preferred method of providing references to 
  7772. functions in Dynamic Link Libraries.  When a Dynamic Link Library is modified, 
  7773. typically the import library corresponding to the modified Dynamic Link Library 
  7774. is updated to reflect the changes.  Hence, any directive file that specifies 
  7775. the import library in a "LIBRARY" directive need not be modified.  However, if 
  7776. you are using "IMPORT" directives, you may have to modify the "IMPORT" 
  7777. directives to reflect the changes in the Dynamic Link Library. 
  7778.  
  7779.  
  7780. ΓòÉΓòÉΓòÉ 11.2. Win32:  Memory Layout ΓòÉΓòÉΓòÉ
  7781.  
  7782.  
  7783. The following describes the segment ordering of an application linked by the 
  7784. Watcom Linker.  Note that this assumes that the "DOSSEG" linker option has been 
  7785. specified. 
  7786.  
  7787.    1. all segments not belonging to group "DGROUP" with class "CODE" 
  7788.  
  7789.    2. all other segments not belonging to group "DGROUP" 
  7790.  
  7791.    3. all segments belonging to group "DGROUP" with class "BEGDATA" 
  7792.  
  7793.    4. all segments belonging to group "DGROUP" not with class "BEGDATA", "BSS" 
  7794.       or "STACK" 
  7795.  
  7796.    5. all segments belonging to group "DGROUP" with class "BSS" 
  7797.  
  7798.    6. all segments belonging to group "DGROUP" with class "STACK" 
  7799.  
  7800.  A special segment belonging to class "BEGDATA" is defined when linking with 
  7801.  Watcom run-time libraries.  This segment is initialized with the hexadecimal 
  7802.  byte pattern "01" and is the first segment in group "DGROUP" so that storing 
  7803.  data at location 0 can be detected. 
  7804.  
  7805.  Segments belonging to class "BSS" contain uninitialized data.  Note that this 
  7806.  only includes uninitialized data in segments belonging to group "DGROUP". 
  7807.  Segments belonging to class "STACK" are used to define the size of the stack 
  7808.  used for your application.  Segments belonging to the classes "BSS" and 
  7809.  "STACK" are last in the segment ordering so that uninitialized data need not 
  7810.  take space in the executable file. 
  7811.  
  7812.  
  7813. ΓòÉΓòÉΓòÉ 11.3. Win32:  The Watcom Linker Memory Requirements ΓòÉΓòÉΓòÉ
  7814.  
  7815.  
  7816. The Watcom Linker uses all available memory when linking an application.  For 
  7817. DOS-hosted versions of the Watcom Linker, this includes expanded memory (EMS) 
  7818. and extended memory.  It is possible for the size of the image being linked to 
  7819. exceed the amount of memory available in your machine, particularly if the 
  7820. image file is to contain debugging information. For this reason, a temporary 
  7821. disk file is used when all available memory is used by the Watcom Linker. 
  7822.  
  7823. Normally, the temporary file is created in the default directory.  However, by 
  7824. defining the "tmp" environment variable to be a directory, you can tell the 
  7825. Watcom Linker where to create the temporary file.  This can be particularly 
  7826. useful if you have a RAM disk.  Consider the following definition of the "tmp" 
  7827. environment variable. 
  7828.  
  7829.  
  7830.    set tmp=\tmp 
  7831.  
  7832. The Watcom Linker will create the temporary file in the directory "\tmp". 
  7833.  
  7834.  
  7835. ΓòÉΓòÉΓòÉ 12. Watcom Linker Diagnostic Messages ΓòÉΓòÉΓòÉ
  7836.  
  7837.  
  7838. The Watcom Linker issues three classes of messages; fatal errors, errors and 
  7839. warnings.  Each message has a 4-digit number associated with it.  Fatal 
  7840. messages start with the digit 3, error messages start with the digit 2, and 
  7841. warning messages start with the digit 1.  It is possible for a message to be 
  7842. issued as a warning or an error. 
  7843.  
  7844. If a fatal error occurs, the linker will terminate immediately and no 
  7845. executable file will be generated. 
  7846.  
  7847. If an error occurs, the linker will continue to execute so that all possible 
  7848. errors are issued.  However, no executable file will be generated since these 
  7849. errors do not permit a proper executable file to be generated. 
  7850.  
  7851. If a warning occurs, the linker will continue to execute.  A warning message is 
  7852. usually informational and does not prevent the creation of a proper executable 
  7853. file.  However, all warnings should eventually be corrected. 
  7854.  
  7855. The messages listed contain references to %s, %S, %a, %x, %d, %l, and %f.  They 
  7856. represent strings that are substituted by the Watcom Linker to make the error 
  7857. message more precise. 
  7858.  
  7859.    1. %s represents a string.  This may be a segment or group name, or the name 
  7860.       of a linker directive or option. 
  7861.  
  7862.    2. %S represents the name of a symbol. 
  7863.  
  7864.    3. %a represents an address.  The format of the address depends on the 
  7865.       format of the executable file being generated. 
  7866.  
  7867.    4. %x represents a hexadecimal number. 
  7868.  
  7869.    5. %d represents integers in the range -32768 and 32767. 
  7870.  
  7871.    6. %l represents integers in the range -2147483648 and 2147483647. 
  7872.  
  7873.    7. %f represents an executable file format such as DOS, WINDOWS, PHARLAP, 
  7874.       NOVELL, OS2, QNX or ELF. 
  7875.  
  7876.  The following is a list of all warning and error messages produced by the 
  7877.  Watcom Linker followed by a description of the message.  A message may contain 
  7878.  more than one reference to "%s".  In such a case, the description will 
  7879.  reference them as "%sn" where n is the occurrence of "%s" in the message. 
  7880.  
  7881.  
  7882. ΓòÉΓòÉΓòÉ 12.1. 2002 ** internal ** - %s ΓòÉΓòÉΓòÉ
  7883.  
  7884.  
  7885. If this message occurs, you have found a bug in the linker and should report 
  7886. it. 
  7887.  
  7888.  
  7889. ΓòÉΓòÉΓòÉ 12.2. 2008 cannot open %s1 :  %s2 ΓòÉΓòÉΓòÉ
  7890.  
  7891.  
  7892. An error occurred while trying to open the file "%s1".  The reason for the 
  7893. error is given by "%s2".  Generally this error message is issued when the 
  7894. linker cannot open a file (e.g., an object file or an executable file). 
  7895.  
  7896.  
  7897. ΓòÉΓòÉΓòÉ 12.3. 3009 dynamic memory exhausted ΓòÉΓòÉΓòÉ
  7898.  
  7899.  
  7900. The linker uses all available memory when linking an application.  For 
  7901. DOS-hosted versions of the linker, this includes expanded memory (EMS) and 
  7902. extended memory.  When all available memory is used, a spill file will be used. 
  7903. Therefore, unless you are low on disk space, the linker will always be able to 
  7904. generate the executable file.  Dynamic memory is the memory the linker uses to 
  7905. build its internal data structures and symbol table.  Dynamic memory is the 
  7906. amount of unallocated memory available on your machine (including virtual 
  7907. memory for those operating systems that support it).  A spill file is not used 
  7908. for dynamic memory.  If the linker issues this message, it cannot link your 
  7909. application.  The following are suggestions that may help you in this 
  7910. situation. 
  7911.  
  7912.    1. Concatenate all your object files into one and specify only the resulting 
  7913.       object file as input to the linker.  For example, if you are linking in a 
  7914.       DOS environment, you can issue the following DOS command. 
  7915.  
  7916.  
  7917.          C>copy/b *.obj all.obj 
  7918.  
  7919.       This technique only works for OMF-type object files.  This significantly 
  7920.       reduces the size of the file list the linker must maintain. 
  7921.  
  7922.    2. Object files may contain a record which specifies the module name.  This 
  7923.       information is used by Watcom Debugger to locate modules during a 
  7924.       debugging session and usually contains the full path of the source file. 
  7925.       This can consume a significant amount of memory when many such object 
  7926.       files are being linked.  If your source is being compiled by the Watcom C 
  7927.       or C++ compiler, you can use the "nm" option to set the module name to 
  7928.       just the file name.  This reduces the amount of memory required by the 
  7929.       linker.  If your are using Watcom Debugger to debug your application, you 
  7930.       may have to use the "set source" command so that the source corresponding 
  7931.       to a module can be located. 
  7932.  
  7933.    3. Typically, when you are compiling a program for a large code model, each 
  7934.       module defines a different "text" segment.  If you are compiling your 
  7935.       application using the Watcom C or C++ compiler, you can reduce the number 
  7936.       of "text" segments that the linker has to process by specifying the "nt" 
  7937.       option.  The "nt" option allows you to specify the name of the "text" 
  7938.       segment so that a group of object files define the same "text" segment. 
  7939.  
  7940.  
  7941. ΓòÉΓòÉΓòÉ 12.4. 2010,3010 I/O error processing %s1 :  %s2 ΓòÉΓòÉΓòÉ
  7942.  
  7943.  
  7944. An error has occurred while processing the file "%s1".  The cause of the error 
  7945. is given by "%s2".  This error is usually detected while reading from object 
  7946. and library files or writing to the spill file or executable file.  For 
  7947. example, this error would be issued if a "disk full" condition existed. 
  7948.  
  7949.  
  7950. ΓòÉΓòÉΓòÉ 12.5. 2011 invalid object file attribute ΓòÉΓòÉΓòÉ
  7951.  
  7952.  
  7953. The linker encountered an object file that was not of the format required of an 
  7954. object file. 
  7955.  
  7956.  
  7957. ΓòÉΓòÉΓòÉ 12.6. 2012 invalid library file attribute ΓòÉΓòÉΓòÉ
  7958.  
  7959.  
  7960. The linker encountered a library file that was not of the format required of a 
  7961. library file. 
  7962.  
  7963.  
  7964. ΓòÉΓòÉΓòÉ 12.7. 3013 break key detected ΓòÉΓòÉΓòÉ
  7965.  
  7966.  
  7967. The linking process was interrupted by the user from the keyboard. 
  7968.  
  7969.  
  7970. ΓòÉΓòÉΓòÉ 12.8. 1014 stack segment not found ΓòÉΓòÉΓòÉ
  7971.  
  7972.  
  7973. The linker identifies the stack segment by a segment defined as having the 
  7974. "STACK" attribute.  This message is issued if no such segment is encountered. 
  7975. This usually happens if the linker cannot find the run-time libraries required 
  7976. to link your application. 
  7977.  
  7978.  
  7979. ΓòÉΓòÉΓòÉ 12.9. 2015 bad relocation type specified ΓòÉΓòÉΓòÉ
  7980.  
  7981.  
  7982. This message is issued if a a relocation is found in an object file which the 
  7983. linker does not support. 
  7984.  
  7985.  
  7986. ΓòÉΓòÉΓòÉ 12.10. 2016 %a:  absolute target invalid for self-relative relocation ΓòÉΓòÉΓòÉ
  7987.  
  7988.  
  7989. This message is issued, for example, if a near call or jump is made to an 
  7990. external symbol which is defined using the "EQU" assembler directive.  "%a" 
  7991. identifies the location of the near call or jump instruction. 
  7992.  
  7993.  
  7994. ΓòÉΓòÉΓòÉ 12.11. 2017 bad location specified for self-relative relocation at %a ΓòÉΓòÉΓòÉ
  7995.  
  7996.  
  7997. This message is issued if a bad fixup is encountered.  "%a" defines the 
  7998. location of the fixup. 
  7999.  
  8000.  
  8001. ΓòÉΓòÉΓòÉ 12.12. 2018 relocation offset at %a is out of range ΓòÉΓòÉΓòÉ
  8002.  
  8003.  
  8004. This message is issued when the offset part of a relocation exceeds 64K in a 
  8005. 16-bit executable or an Alpha executable.  "%a" defines the location of the 
  8006. fixup.  The error is most commonly caused by errors in coding assembly language 
  8007. routines.  Consider a module that references an external symbol that is defined 
  8008. in a segment different from the one in which the reference occurred.  The 
  8009. module, however, specifies that the segment in which the symbol is defined is 
  8010. the same segment as the segment that references the symbol.  This error is most 
  8011. commonly caused when the "EXTRN" assembler directive is placed after the 
  8012. "SEGMENT" assembler directive for the segment referencing the symbol.  If the 
  8013. segment that references the symbol is allocated far enough away from the 
  8014. segment that defines the symbol, the linker will issue this message. 
  8015.  
  8016.  
  8017. ΓòÉΓòÉΓòÉ 12.13. 1019 segment relocation at %a ΓòÉΓòÉΓòÉ
  8018.  
  8019.  
  8020. This message is issued when a 16-bit segment relocation is encountered and 
  8021. "FORMAT DOS COM", "FORMAT PHARLAP" or "FORMAT NOVELL" has been specified.  None 
  8022. of the above executable file formats allow segment relocation.  "%a" identifies 
  8023. the location of the segment relocation. 
  8024.  
  8025.  
  8026. ΓòÉΓòÉΓòÉ 12.14. 2020 size of group %s exceeds 64k by %l bytes ΓòÉΓòÉΓòÉ
  8027.  
  8028.  
  8029. The group "%s" has exceeded the maximum size (64K) allowed for a group in a 
  8030. 16-bit executable by "%l" bytes.  Usually, the group is "DGROUP" (the default 
  8031. data segment) and your application has placed too much data in this group.  One 
  8032. of the following may solve this problem. 
  8033.  
  8034.    1. If you are using the Watcom C or C++ compiler, you can place some of your 
  8035.       data in a far segment by using the "far" keyword when defining data.  You 
  8036.       can also decrease the value of the data threshold by using the "zt" 
  8037.       compiler option.  Any datum whose size exceeds the value of the data 
  8038.       threshold will be placed in a far segment. 
  8039.  
  8040.    2. If you are using the Watcom FORTRAN 77 compiler, you can decrease the 
  8041.       value of the data threshold by using the "dt" compiler option.  Any datum 
  8042.       whose size exceeds the value of the data threshold will be placed in a 
  8043.       far segment. 
  8044.  
  8045.  
  8046. ΓòÉΓòÉΓòÉ 12.15. 2021 size of segment %s exceeds 64k by %l bytes ΓòÉΓòÉΓòÉ
  8047.  
  8048.  
  8049. The segment "%s" has exceeded the maximum size (64K) for a segment in a 16-bit 
  8050. executable.  This usually occurs if you are linking a 16-bit application that 
  8051. has been compiled for a small code model and the size of the application has 
  8052. grown in such a way that the size of the code segment ("_TEXT") has exceeded 
  8053. 64K.  You can compile your application for a large code model if you cannot 
  8054. reduce the amount of code in your application. 
  8055.  
  8056.  
  8057. ΓòÉΓòÉΓòÉ 12.16. 2022 cannot have a starting address with an imported symbol ΓòÉΓòÉΓòÉ
  8058.  
  8059.  
  8060. When generating an OS/2 executable file, a symbol imported from a DLL cannot be 
  8061. a start address.  When generating a NetWare 386 executable file, a symbol 
  8062. imported from an NLM cannot be a start address. 
  8063.  
  8064.  
  8065. ΓòÉΓòÉΓòÉ 12.17. 1023 no starting address found, using %a ΓòÉΓòÉΓòÉ
  8066.  
  8067.  
  8068. The starting address defines the location where execution is to begin and must 
  8069. be defined by a special "module end" record in one of the object files linked 
  8070. into your application.  This message is issued if no such record is encountered 
  8071. in which case a default starting address, namely "%a", will be used.  This 
  8072. usually happens if the linker cannot find the run-time libraries required to 
  8073. link your application. 
  8074.  
  8075.  
  8076. ΓòÉΓòÉΓòÉ 12.18. 2026 redefinition of reserved symbol %s ΓòÉΓòÉΓòÉ
  8077.  
  8078.  
  8079. The linker defines certain reserved symbols.  These symbols are "_edata", 
  8080. "_end", "__OVLTAB__", "__OVLSTARTVEC__", "__OVLENDVEC__", "__LOVLLDR__", 
  8081. "__NOVLLDR__", "__SOVLLDR__", "__LOVLINIT__", "__NOVLINIT__" and 
  8082. "__SOVLINIT__".  The symbols "_edata" and "_end" are defined only if the 
  8083. "DOSSEG" option is specified.  Your application must not attempt to define 
  8084. these symbols.  "%s" identifies the reserved symbol. 
  8085.  
  8086.  
  8087. ΓòÉΓòÉΓòÉ 12.19. 1027 redefinition of %S ignored ΓòÉΓòÉΓòÉ
  8088.  
  8089.  
  8090. The symbol "%S" has been defined by more that one module; the first definition 
  8091. is used.  This is only a warning message.  Note that if a symbol is defined 
  8092. more than once and its address is the same in both cases, no warning will be 
  8093. issued.  This prevents the warning message from being issued when linking 
  8094. FORTRAN 77 modules that contain common blocks. 
  8095.  
  8096.  
  8097. ΓòÉΓòÉΓòÉ 12.20. 1028,2028 %S is an undefined reference ΓòÉΓòÉΓòÉ
  8098.  
  8099.  
  8100. The symbol "%S" has been referenced but not defined.  Check that the spelling 
  8101. of the symbol is consistent.  If you wish the linker to ignore undefined 
  8102. references, use the "UNDEFSOK" option. 
  8103.  
  8104.  
  8105. ΓòÉΓòÉΓòÉ 12.21. 2029 premature end of file encountered ΓòÉΓòÉΓòÉ
  8106.  
  8107.  
  8108. This error is issued while processing object files and object modules from 
  8109. libraries and is caused if the end of the file or module is reached before the 
  8110. "module end" record is encountered.  The probable cause is a truncated object 
  8111. file. 
  8112.  
  8113.  
  8114. ΓòÉΓòÉΓòÉ 12.22. 2030 multiple starting addresses found ΓòÉΓòÉΓòÉ
  8115.  
  8116.  
  8117. The starting address defines the location where execution is to begin and is 
  8118. defined by a "module end" record in a particular object file.  This message is 
  8119. issued if more than one object file contains a "module end" record that defines 
  8120. a starting address. 
  8121.  
  8122.  
  8123. ΓòÉΓòÉΓòÉ 12.23. 2031 segment %s is in group %s and group %s ΓòÉΓòÉΓòÉ
  8124.  
  8125.  
  8126. The segment "%s1" has been defined to be in group "%s2" in one module and in 
  8127. group "%s3" in another module.  A segment can only belong to one group. 
  8128.  
  8129.  
  8130. ΓòÉΓòÉΓòÉ 12.24. 1032 record (type 0x%x) not processed ΓòÉΓòÉΓòÉ
  8131.  
  8132.  
  8133. An object record type not supported by the linker has been encountered.  This 
  8134. message is issued when linking object modules created by other compilers or 
  8135. assemblers that create object files with records that the linker does not 
  8136. support. 
  8137.  
  8138.  
  8139. ΓòÉΓòÉΓòÉ 12.25. 2033,3033 directive error near '%s' ΓòÉΓòÉΓòÉ
  8140.  
  8141.  
  8142. A syntax error occurred while the linker was processing directives.  "%s" 
  8143. specifies where the error occurred. 
  8144.  
  8145.  
  8146. ΓòÉΓòÉΓòÉ 12.26. 2034 %a cannot have an offset with an imported symbol ΓòÉΓòÉΓòÉ
  8147.  
  8148.  
  8149. An imported symbol is one that was specified in an "IMPORT" directive. 
  8150. Imported symbols are defined in Windows or OS/2 16-bit DLLs and in Netware 386 
  8151. NLMs.  References to imported symbols must always have an offset value of 0. 
  8152. If "DosWrite" is an imported symbol, then referencing "DosWrite+2" is illegal. 
  8153. "%a" defines the location of the illegal reference. 
  8154.  
  8155.  
  8156. ΓòÉΓòÉΓòÉ 12.27. 1038 DEBUG directive appears after object files ΓòÉΓòÉΓòÉ
  8157.  
  8158.  
  8159. This message is issued if the first "DEBUG" directive appears after a "FILE" 
  8160. directive.  A common error is to specify a "DEBUG" directive after the "FILE" 
  8161. directives in which case no debugging information for those object files is 
  8162. generated in the executable file. 
  8163.  
  8164.  
  8165. ΓòÉΓòÉΓòÉ 12.28. 2039 ALIGNMENT value too small ΓòÉΓòÉΓòÉ
  8166.  
  8167.  
  8168. The value specified in the "ALIGNMENT" option refers to the alignment of 
  8169. segments in the executable file.  For 16-bit Windows or 16-bit OS/2, segments 
  8170. in the executable file are pointed to by a segment table.  An entry in the 
  8171. segment table contains a 16-bit value which is a multiple of the alignment 
  8172. value.  Together they form the offset of the segment from the start of the 
  8173. segment table.  The smaller the alignment, the bigger the value required in the 
  8174. segment table to point to the segment.  If this value exceeds 64K, then a 
  8175. larger alignment value is required to decrease the size that goes in the 
  8176. segment table. 
  8177.  
  8178.  
  8179. ΓòÉΓòÉΓòÉ 12.29. 2040 ordinal in IMPORT directive not valid ΓòÉΓòÉΓòÉ
  8180.  
  8181.  
  8182. The specified ordinal in the "IMPORT" directive is incorrect (e.g., -1).  An 
  8183. ordinal number must be in the range 0 to 65535. 
  8184.  
  8185.  
  8186. ΓòÉΓòÉΓòÉ 12.30. 2041 ordinal in EXPORT directive not valid ΓòÉΓòÉΓòÉ
  8187.  
  8188.  
  8189. The specified ordinal in the "EXPORT" directive is incorrect (e.g., -1).  An 
  8190. ordinal number must be in the range 0 to 65535. 
  8191.  
  8192.  
  8193. ΓòÉΓòÉΓòÉ 12.31. 2042 too many IOPL words in EXPORT directive ΓòÉΓòÉΓòÉ
  8194.  
  8195.  
  8196. The maximum number of IOPL words for a 16-bit executable is 63. 
  8197.  
  8198.  
  8199. ΓòÉΓòÉΓòÉ 12.32. 1043 duplicate exported ordinal ΓòÉΓòÉΓòÉ
  8200.  
  8201.  
  8202. This message is issued for ordinal numbers specified in an "EXPORT" directive 
  8203. for symbols belonging to DLLs.  This message is issued if an ordinal number is 
  8204. assigned to two different symbols.  A warning is issued and the linker assigns 
  8205. a non-used ordinal number to the symbol that caused the warning. 
  8206.  
  8207.  
  8208. ΓòÉΓòÉΓòÉ 12.33. 1044,2044 exported symbol %s not found ΓòÉΓòÉΓòÉ
  8209.  
  8210.  
  8211. This message is issued when generating a DLL or NetWare 386 NLM.  An attempt 
  8212. has been made to define an entry point into a DLL or NLM that does not exist. 
  8213.  
  8214.  
  8215. ΓòÉΓòÉΓòÉ 12.34. 1045 segment attribute defined more than once ΓòÉΓòÉΓòÉ
  8216.  
  8217.  
  8218. A segment appearing in a "SEGMENT" directive has been given conflicting or 
  8219. duplicate attributes. 
  8220.  
  8221.  
  8222. ΓòÉΓòÉΓòÉ 12.35. 1046 segment name %s not found ΓòÉΓòÉΓòÉ
  8223.  
  8224.  
  8225. The segment name specified in a "SEGMENT" directive has not been defined. 
  8226.  
  8227.  
  8228. ΓòÉΓòÉΓòÉ 12.36. 1047 class name %s not found ΓòÉΓòÉΓòÉ
  8229.  
  8230.  
  8231. The class name specified in a "SEGMENT" directive has not been defined. 
  8232.  
  8233.  
  8234. ΓòÉΓòÉΓòÉ 12.37. 1048 inconsistent attributes for automatic data segment ΓòÉΓòÉΓòÉ
  8235.  
  8236.  
  8237. This message is issued for Windows or OS/2 16-bit executable files.  Two 
  8238. conflicting attributes were specified for the automatic data segment.  For 
  8239. example, "LOADONCALL" and "PRELOAD" are conflicting attributes.  Only the first 
  8240. attribute is used. 
  8241.  
  8242.  
  8243. ΓòÉΓòÉΓòÉ 12.38. 2049 invalid STUB file ΓòÉΓòÉΓòÉ
  8244.  
  8245.  
  8246. The stub file is not a valid executable file.  The stub file is only used for 
  8247. OS/2 executable files and Windows (both Win16 and Win32) executable files. 
  8248.  
  8249.  
  8250. ΓòÉΓòÉΓòÉ 12.39. 1050 invalid DLL specified in OLDLIBRARY option ΓòÉΓòÉΓòÉ
  8251.  
  8252.  
  8253. The DLL specified in an "OLDLIBRARY" option is not a valid dynamic link 
  8254. library. 
  8255.  
  8256.  
  8257. ΓòÉΓòÉΓòÉ 12.40. 2051 STUB file name same as executable file name ΓòÉΓòÉΓòÉ
  8258.  
  8259.  
  8260. When generating an OS/2 or Windows (Win16, Win32) executable file, the stub 
  8261. file name must not be same as the executable file name. 
  8262.  
  8263.  
  8264. ΓòÉΓòÉΓòÉ 12.41. 2052 relocation at %a not in the same segment ΓòÉΓòÉΓòÉ
  8265.  
  8266.  
  8267. This message is only issued for Windows (Win16), OS/2, Phar Lap, and QNX 
  8268. executables.  A relative fixup must relocate to the same segment.  "%a" defines 
  8269. the location of the fixup. 
  8270.  
  8271.  
  8272. ΓòÉΓòÉΓòÉ 12.42. 2053 %a:  cannot reach a DLL with a relative relocation ΓòÉΓòÉΓòÉ
  8273.  
  8274.  
  8275. A reference to a symbol in an OS/2 or Windows 16-bit DLL must not be relative. 
  8276. "%a" defines the location of the reference. 
  8277.  
  8278.  
  8279. ΓòÉΓòÉΓòÉ 12.43. 1054 debugging information incompatible:  using line numbers only ΓòÉΓòÉΓòÉ
  8280.  
  8281.  
  8282. An attempt has been made to link an object file with out-of-date debugging 
  8283. information. 
  8284.  
  8285.  
  8286. ΓòÉΓòÉΓòÉ 12.44. 2055 %a:  frame must be the same as the target in protected mode ΓòÉΓòÉΓòÉ
  8287.  
  8288.  
  8289. Each relocation consists of three components; the location being relocated, the 
  8290. target (or address being referenced), and the frame (the segment to which the 
  8291. target is adjusted).  In protected mode, the segment of the target must be the 
  8292. same as the frame.  "%a" defines the location of the fixup.  This message does 
  8293. not apply to 32-bit OS/2 and Windows (Win32). 
  8294.  
  8295.  
  8296. ΓòÉΓòÉΓòÉ 12.45. 2056 cannot find library member %s(%s) ΓòÉΓòÉΓòÉ
  8297.  
  8298.  
  8299. Library member "%s2" in library file "%s1" could not be found.  This message is 
  8300. issued if the library file could not be found or the library file did not 
  8301. contain the specified member. 
  8302.  
  8303.  
  8304. ΓòÉΓòÉΓòÉ 12.46. 3057 executable format has been established ΓòÉΓòÉΓòÉ
  8305.  
  8306.  
  8307. This message is issued if there is more than one "FORMAT" directive. 
  8308.  
  8309.  
  8310. ΓòÉΓòÉΓòÉ 12.47. 1058 %s option not valid for %s executable ΓòÉΓòÉΓòÉ
  8311.  
  8312.  
  8313. The option "%s1" can only be specified if an executable file whose format is 
  8314. "%s2" is being generated. 
  8315.  
  8316.  
  8317. ΓòÉΓòÉΓòÉ 12.48. 1059,2059 value for %s too large ΓòÉΓòÉΓòÉ
  8318.  
  8319.  
  8320. The value specified for option "%s" exceeds its limit. 
  8321.  
  8322.  
  8323. ΓòÉΓòÉΓòÉ 12.49. 1060 value for %s incorrect ΓòÉΓòÉΓòÉ
  8324.  
  8325.  
  8326. The value specified for option "%s" is not in the allowable range. 
  8327.  
  8328.  
  8329. ΓòÉΓòÉΓòÉ 12.50. 1061 multiple values specified for REALBREAK ΓòÉΓòÉΓòÉ
  8330.  
  8331.  
  8332. The "REALBREAK" option for Phar Lap executables can only be specified once. 
  8333.  
  8334.  
  8335. ΓòÉΓòÉΓòÉ 12.51. 1062 export and import records not valid for %f ΓòÉΓòÉΓòÉ
  8336.  
  8337.  
  8338. This message is issued if a reference to a DLL is encountered and the 
  8339. executable file format is not one that supports DLLs.  The file format is 
  8340. represented by "%f". 
  8341.  
  8342.  
  8343. ΓòÉΓòÉΓòÉ 12.52. 2063 invalid relocation for flat memory model at %a ΓòÉΓòÉΓòÉ
  8344.  
  8345.  
  8346. A segment relocation in the flat memory model was encountered.  "%a" defines 
  8347. the location of the fixup. 
  8348.  
  8349.  
  8350. ΓòÉΓòÉΓòÉ 12.53. 2064 cannot combine 32-bit segments with 16-bit segments ΓòÉΓòÉΓòÉ
  8351.  
  8352.  
  8353. A 16-bit segment and a 32-bit segment have been encountered.  Mixing object 
  8354. files created by a 286 compiler and object files created by a 386 compiler is 
  8355. the most probable cause of this error. 
  8356.  
  8357.  
  8358. ΓòÉΓòÉΓòÉ 12.54. 2065 REALBREAK symbol %s not found ΓòÉΓòÉΓòÉ
  8359.  
  8360.  
  8361. The symbol specified in the "REALBREAK" option for Phar Lap executables has not 
  8362. been defined. 
  8363.  
  8364.  
  8365. ΓòÉΓòÉΓòÉ 12.55. 2066 invalid relative relocation type for an import at %a ΓòÉΓòÉΓòÉ
  8366.  
  8367.  
  8368. This message is issued only if a NetWare 386 executable file is being 
  8369. generated.  An imported symbol is one that was specified in an "IMPORT" 
  8370. directive or an import library.  Any reference to an imported symbol must not 
  8371. refer to the segment of the imported symbol.  "%a" defines the location of the 
  8372. reference. 
  8373.  
  8374.  
  8375. ΓòÉΓòÉΓòÉ 12.56. 2067 %a:  cannot relocate between code and data in Novell formats ΓòÉΓòÉΓòÉ
  8376.  
  8377.  
  8378. This message is issued only if a NetWare 386 executable file is being 
  8379. generated.  Segment relocation is not permitted.  "%a" defines the location of 
  8380. the fixup. 
  8381.  
  8382.  
  8383. ΓòÉΓòÉΓòÉ 12.57. 2068 absolute segment fixup not valid in protected mode ΓòÉΓòÉΓòÉ
  8384.  
  8385.  
  8386. A reference to an absolute location is not allowed in protected mode.  A 
  8387. protected-mode application is one that is being generated for OS/2, FlashTek's 
  8388. DOS extender, Phar Lap's 386|DOS-Extender, Tenberry Software's DOS/4G or 
  8389. DOS/4GW DOS extender, Novell's NetWare 386 operating system, Windows NT, or 
  8390. Windows 95.  An absolute location is most commonly defined by the "EQU" 
  8391. assembler directive. 
  8392.  
  8393.  
  8394. ΓòÉΓòÉΓòÉ 12.58. 1069 unload CHECK procedure not found ΓòÉΓòÉΓòÉ
  8395.  
  8396.  
  8397. This message is issued only if a NetWare 386 executable file is being 
  8398. generated.  The symbol specified in the "CHECK" option has not been defined. 
  8399.  
  8400.  
  8401. ΓòÉΓòÉΓòÉ 12.59. 2070 START procedure not found ΓòÉΓòÉΓòÉ
  8402.  
  8403.  
  8404. This message is issued only if a NetWare 386 executable file is being 
  8405. generated.  The symbol specified in the "START" option has not been defined. 
  8406. The default "START" symbol is "_Prelude". 
  8407.  
  8408.  
  8409. ΓòÉΓòÉΓòÉ 12.60. 2071 EXIT procedure not found ΓòÉΓòÉΓòÉ
  8410.  
  8411.  
  8412. This message is issued only if a NetWare 386 executable file is being 
  8413. generated.  The symbol specified in the "EXIT" option has not been defined. 
  8414. The default "STOP" symbol is "_Stop". 
  8415.  
  8416.  
  8417. ΓòÉΓòÉΓòÉ 12.61. 2073 bad Novell file format specified ΓòÉΓòÉΓòÉ
  8418.  
  8419.  
  8420. An invalid NetWare 386 executable file format was specified.  Valid formats are 
  8421. NLM, DSK, NAM and LAN. 
  8422.  
  8423.  
  8424. ΓòÉΓòÉΓòÉ 12.62. 2074 circular alias found for %s ΓòÉΓòÉΓòÉ
  8425.  
  8426.  
  8427. An attempt was made to circularly define the symbol name specified in an ALIAS 
  8428. directive.  For example: 
  8429.  
  8430.  
  8431.    ALIAS foo1=foo2, foo2=foo1 
  8432.  
  8433.  
  8434. ΓòÉΓòÉΓòÉ 12.63. 1076 %s option multiply specified ΓòÉΓòÉΓòÉ
  8435.  
  8436.  
  8437. The option "%s" can only be specified once. 
  8438.  
  8439.  
  8440. ΓòÉΓòÉΓòÉ 12.64. 1080 file %s is a %d-bit object file ΓòÉΓòÉΓòÉ
  8441.  
  8442.  
  8443. A 32-bit attribute was encountered while generating a 16-bit executable file 
  8444. format, or a 16-bit attribute was encountered while generating a 32-bit 
  8445. executable file format. 
  8446.  
  8447.  
  8448. ΓòÉΓòÉΓòÉ 12.65. 2082 invalid record type 0x%x ΓòÉΓòÉΓòÉ
  8449.  
  8450.  
  8451. An object record type not recognized by the linker has been encountered.  This 
  8452. message is issued when linking object modules created by other compilers or 
  8453. assemblers that create object files with records that the linker does not 
  8454. recognize. 
  8455.  
  8456.  
  8457. ΓòÉΓòÉΓòÉ 12.66. 2083 cannot reference address %a from frame %x ΓòÉΓòÉΓòÉ
  8458.  
  8459.  
  8460. When generating a 16-bit executable, the offset of a referenced symbol was 
  8461. greater than 64K from the location referencing it. 
  8462.  
  8463.  
  8464. ΓòÉΓòÉΓòÉ 12.67. 2084 target offset exceeds 64K at %a ΓòÉΓòÉΓòÉ
  8465.  
  8466.  
  8467. When generating a 16-bit executable, the computed offset for a symbol exceeds 
  8468. 64K.  "%a" defines the location of the fixup. 
  8469.  
  8470.  
  8471. ΓòÉΓòÉΓòÉ 12.68. 2086 invalid starting address for .COM file ΓòÉΓòÉΓòÉ
  8472.  
  8473.  
  8474. The value of the segment of the starting address for a 16-bit DOS "COM" file, 
  8475. as specified in the map file, must be 0. 
  8476.  
  8477.  
  8478. ΓòÉΓòÉΓòÉ 12.69. 1087 stack segment ignored in .COM file ΓòÉΓòÉΓòÉ
  8479.  
  8480.  
  8481. A stack segment must not be defined when generating a 16-bit DOS "COM" file. 
  8482. Only a single physical segment is allowed in a DOS "COM" file.  The stack is 
  8483. allocated from the high end of the physical segment.  That is, the initial 
  8484. value of SP is hexadecimal FFFE. 
  8485.  
  8486.  
  8487. ΓòÉΓòÉΓòÉ 12.70. 3088 virtual memory exhausted ΓòÉΓòÉΓòÉ
  8488.  
  8489.  
  8490. This message is similar to the "dynamic memory exhausted" message.  The 
  8491. DOS-hosted version of the linker has run out of memory trying to keep track of 
  8492. virtual memory blocks.  Virtual memory blocks are allocated from expanded 
  8493. memory, extended memory and the spill file. 
  8494.  
  8495.  
  8496. ΓòÉΓòÉΓòÉ 12.71. 2089 program too large for a .COM file ΓòÉΓòÉΓòÉ
  8497.  
  8498.  
  8499. The total size of a 16-bit DOS "COM" program must not exceed 64K.  That is, the 
  8500. total amount of code and data must be less than 64K since only a single 
  8501. physical segment is allowed in a DOS "COM" file.  You must decrease the size of 
  8502. your program or generate a DOS "EXE" file. 
  8503.  
  8504.  
  8505. ΓòÉΓòÉΓòÉ 12.72. 1090 redefinition of %s by %s ignored ΓòÉΓòÉΓòÉ
  8506.  
  8507.  
  8508. The symbol "%s1" has been redefined by module "%s2".  This message is issued 
  8509. when the size specified in the "NAMELEN" option has caused two symbols to map 
  8510. to the same symbol.  For example, if the symbols routine1 and routine2 are 
  8511. encountered and "OPTION NAMELEN=7" is specified, then this message will be 
  8512. issued since the first seven characters of the two symbols are identical. 
  8513.  
  8514.  
  8515. ΓòÉΓòÉΓòÉ 12.73. 2092 NEWSEGMENT directive appears before object files ΓòÉΓòÉΓòÉ
  8516.  
  8517.  
  8518. The 16-bit "NEWSEGMENT" directive must appear after a "FILE" directive. 
  8519.  
  8520.  
  8521. ΓòÉΓòÉΓòÉ 12.74. 2093 cannot open %s ΓòÉΓòÉΓòÉ
  8522.  
  8523.  
  8524. This message is issued when the linker is unable to open a file and is unable 
  8525. to determine the cause. 
  8526.  
  8527.  
  8528. ΓòÉΓòÉΓòÉ 12.75. 2094 i/o error processing %s ΓòÉΓòÉΓòÉ
  8529.  
  8530.  
  8531. This message is issued when the linker has encountered an i/o error while 
  8532. processing the file and is unable to determine the cause.  This message may be 
  8533. issued when reading from object and library files, or writing to the executable 
  8534. and spill file. 
  8535.  
  8536.  
  8537. ΓòÉΓòÉΓòÉ 12.76. 1098 Offset option must be a multiple of %dK ΓòÉΓòÉΓòÉ
  8538.  
  8539.  
  8540. The value specified with the "OFFSET" option must be a multiple of 4K (4096) 
  8541. for Phar Lap and QNX executables and a multiple of 64K (65536) for OS/2 and 
  8542. Windows 32-bit executables. 
  8543.  
  8544.  
  8545. ΓòÉΓòÉΓòÉ 12.77. 2099 symbol name too long:  %s ΓòÉΓòÉΓòÉ
  8546.  
  8547.  
  8548. The maximum size (approximately 2048) of a symbol has been exceeded.  Reduce 
  8549. the size of the symbol to avoid this error. 
  8550.  
  8551.  
  8552. ΓòÉΓòÉΓòÉ 12.78. 1101 invalid incremental information file ΓòÉΓòÉΓòÉ
  8553.  
  8554.  
  8555. The incremental information file is corrupt or from an older version of the 
  8556. compiler.  The old information file and the executable will be deleted and new 
  8557. ones will be generated. 
  8558.  
  8559.  
  8560. ΓòÉΓòÉΓòÉ 12.79. 1102 object file %s not found for tracing ΓòÉΓòÉΓòÉ
  8561.  
  8562.  
  8563. A "SYMTRACE" or "MODTRACE" directive contained an object file (namely %s) that 
  8564. could not be found. 
  8565.  
  8566.  
  8567. ΓòÉΓòÉΓòÉ 12.80. 1103 library module %s(%s) not found for tracing ΓòÉΓòÉΓòÉ
  8568.  
  8569.  
  8570. A "SYMTRACE" or "MODTRACE" directive contained an object module (namely module 
  8571. %s1 in library %s2 ) that could not be found. 
  8572.  
  8573.  
  8574. ΓòÉΓòÉΓòÉ 12.81. 1107 undefined system name:  %s ΓòÉΓòÉΓòÉ
  8575.  
  8576.  
  8577. The name %s was referenced in a "SYSTEM" directive but never defined by a 
  8578. system block definition. 
  8579.  
  8580.  
  8581. ΓòÉΓòÉΓòÉ 12.82. 1108 system %s defined more than once ΓòÉΓòÉΓòÉ
  8582.  
  8583.  
  8584. The name %s has appeared in a system definition block more than once. 
  8585.  
  8586.  
  8587. ΓòÉΓòÉΓòÉ 12.83. 1109 OFFSET option is less than the stack size ΓòÉΓòÉΓòÉ
  8588.  
  8589.  
  8590. For the QNX operating system, the stack is placed at the front of the 
  8591. executable image and thus the initial load address must leave enough room for 
  8592. the stack. 
  8593.  
  8594.  
  8595. ΓòÉΓòÉΓòÉ 12.84. 1110 library members not allowed in libfile ΓòÉΓòÉΓòÉ
  8596.  
  8597.  
  8598. Only object files are allowed in a "LIBFILE" directive.  This message will be 
  8599. issued if a module from a library file is specified in a "LIBFILE" directive. 
  8600.  
  8601.  
  8602. ΓòÉΓòÉΓòÉ 12.85. 1111 error in default system block ΓòÉΓòÉΓòÉ
  8603.  
  8604.  
  8605. The default system block definition (system name "286" for 16-bit applications) 
  8606. and (system name "386" for 32-bit applications) contains a directive error. 
  8607. The system name "286" or "386" is automatically referenced by the linker when 
  8608. the format of the executable cannot be determined (i.e.  no "FORMAT" directive 
  8609. has been specified). 
  8610.  
  8611.  
  8612. ΓòÉΓòÉΓòÉ 12.86. 3114 environment name specified incorrectly ΓòÉΓòÉΓòÉ
  8613.  
  8614.  
  8615. This message is specified if the environment variable is not properly enclosed 
  8616. between two percent (%) characters. 
  8617.  
  8618.  
  8619. ΓòÉΓòÉΓòÉ 12.87. 1115 environment name %s not found ΓòÉΓòÉΓòÉ
  8620.  
  8621.  
  8622. The environment variable %s has not been defined in the environment space. 
  8623.  
  8624.  
  8625. ΓòÉΓòÉΓòÉ 12.88. 1117 segment number too high for a movable entry point ΓòÉΓòÉΓòÉ
  8626.  
  8627.  
  8628. The segment number of a moveable segment must not exceed 255 for 16-bit 
  8629. executables.  Reduce the number of segments or use the "PACKCODE" option. 
  8630.  
  8631.  
  8632. ΓòÉΓòÉΓòÉ 12.89. 1118 heap size too large ΓòÉΓòÉΓòÉ
  8633.  
  8634.  
  8635. This message is issued if the size of the heap, stack and the default data 
  8636. segment (group DGROUP) exceeds 64K for 16-bit executables. 
  8637.  
  8638.  
  8639. ΓòÉΓòÉΓòÉ 12.90. 2119 wlib import statement incorrect ΓòÉΓòÉΓòÉ
  8640.  
  8641.  
  8642. The "EXPORT" directive allows you to specify a library command file.  This 
  8643. command file is scanned for any librarian commands that create import library 
  8644. entries.  An invalid command was detected.  See the section entitled "The 
  8645. EXPORT Directive" for the correct format of these commands. 
  8646.  
  8647.  
  8648. ΓòÉΓòÉΓòÉ 12.91. 2120 application too large to run under DOS ΓòÉΓòÉΓòÉ
  8649.  
  8650.  
  8651. This message is issued if the size of the 16-bit DOS application exceeds 1M. 
  8652.  
  8653.  
  8654. ΓòÉΓòÉΓòÉ 12.92. 1121 '%s' has already been exported ΓòÉΓòÉΓòÉ
  8655.  
  8656.  
  8657. The linker has detected an attempt to export a symbol more than once.  For 
  8658. example, a name appearing in more than one "EXPORT" directive will cause this 
  8659. message to be issued.  Also, if you have declared a symbol as an export in your 
  8660. source and have also specified the same symbol in an "EXPORT" directive, this 
  8661. message will be issued.  This message is only a warning. 
  8662.  
  8663.  
  8664. ΓòÉΓòÉΓòÉ 12.93. 3122 no FILE directives found ΓòÉΓòÉΓòÉ
  8665.  
  8666.  
  8667. This message is issued if no "FILE" directive has been specified.  In other 
  8668. words, you have specified no object files to link. 
  8669.  
  8670.  
  8671. ΓòÉΓòÉΓòÉ 12.94. 3123 overlays are not supported in this version of the linker ΓòÉΓòÉΓòÉ
  8672.  
  8673.  
  8674. This version of the linker does not support the creation of overlaid 16-bit 
  8675. executables. 
  8676.  
  8677.  
  8678. ΓòÉΓòÉΓòÉ 12.95. 1124 lazy reference for %S has different default resolutions ΓòÉΓòÉΓòÉ
  8679.  
  8680.  
  8681. A lazy external reference is one which has two resolutions:  a preferred one 
  8682. and a default one which is used if the preferred one is not found.  In this 
  8683. case, the linker has found two lazy references that have the same preferred 
  8684. resolution but different default resolutions. 
  8685.  
  8686.  
  8687. ΓòÉΓòÉΓòÉ 12.96. 1125 multiple aliases found for %S ΓòÉΓòÉΓòÉ
  8688.  
  8689.  
  8690. The linker has found a name which has been aliased to two different symbols. 
  8691.  
  8692.  
  8693. ΓòÉΓòÉΓòÉ 12.97. 1126 %s has been modified:  doing full relink ΓòÉΓòÉΓòÉ
  8694.  
  8695.  
  8696. The linker has determined that the time stamps on the executable file and 
  8697. symbolic information file (.sym) are different.  An incremental link will not 
  8698. be done. 
  8699.  
  8700.  
  8701. ΓòÉΓòÉΓòÉ 12.98. 2127 cannot export symbol %S ΓòÉΓòÉΓòÉ
  8702.  
  8703.  
  8704. An attempt was made to export a symbol defined with an absolute address or to 
  8705. export an imported symbol.  It is not possible to export these symbols with the 
  8706. "EXPORT" directive. 
  8707.  
  8708.  
  8709. ΓòÉΓòÉΓòÉ 12.99. 3128 directive error near beginning of input ΓòÉΓòÉΓòÉ
  8710.  
  8711.  
  8712. The linker detected an error at the start of the command line. 
  8713.  
  8714.  
  8715. ΓòÉΓòÉΓòÉ 12.100. 3129 address information too large ΓòÉΓòÉΓòÉ
  8716.  
  8717.  
  8718. The linker has encountered a segment that appears in more than 11000 object 
  8719. files.  An empty segment does not affect this limit.  This can only occur with 
  8720. WATCOM debugging information.  If this message appears, switch to DWARF 
  8721. debugging information. 
  8722.  
  8723.  
  8724. ΓòÉΓòÉΓòÉ 12.101. 1130 %s is an invalid shared nlm file ΓòÉΓòÉΓòÉ
  8725.  
  8726.  
  8727. The NLM specified in a "SHAREDNLM" option is not valid. 
  8728.  
  8729.  
  8730. ΓòÉΓòÉΓòÉ 12.102. 3131 cannot open spill file:  file already exists ΓòÉΓòÉΓòÉ
  8731.  
  8732.  
  8733. All 26 of the DOS-hosted linker's possible spill file names are in use.  Spill 
  8734. files can accumulate when linking on a multi-tasking system and the directory 
  8735. in which the spill file is created is identical for each invocation of the 
  8736. linker. 
  8737.  
  8738.  
  8739. ΓòÉΓòÉΓòÉ 12.103. 2132 curly brace delimited list incorrect ΓòÉΓòÉΓòÉ
  8740.  
  8741.  
  8742. A list delimited by curly braces is not correct.  The most likely cause is a 
  8743. missing right brace. 
  8744.  
  8745.  
  8746. ΓòÉΓòÉΓòÉ 12.104. 1133 no realbreak specified for 16-bit code ΓòÉΓòÉΓòÉ
  8747.  
  8748.  
  8749. While generating a Phar Lap executable file, both 16-bit and 32-bit code was 
  8750. linked together and no "REALBREAK" option has been specified.  A warning 
  8751. message is issued since this may be a potential problem. 
  8752.  
  8753.  
  8754. ΓòÉΓòÉΓòÉ 12.105. 1134 %s is an invalid message file ΓòÉΓòÉΓòÉ
  8755.  
  8756.  
  8757. The file specified in a "MESSAGE" option for NetWare 386 executable files is 
  8758. invalid. 
  8759.  
  8760.  
  8761. ΓòÉΓòÉΓòÉ 12.106. 1136 relocation to a read/write data segment found at %a ΓòÉΓòÉΓòÉ
  8762.  
  8763.  
  8764. The "RWRELOCCHECK" option for 16-bit Windows (Win16) executables has been 
  8765. specified and the linker has detected a segment relocation to a read/write data 
  8766. segment. 
  8767.  
  8768.  
  8769. ΓòÉΓòÉΓòÉ 12.107. 3137 too many errors encountered ΓòÉΓòÉΓòÉ
  8770.  
  8771.  
  8772. This message is issued when the number of error messages issued by the linker 
  8773. exceeds the number specified by the "MAXERRORS" option. 
  8774.  
  8775.  
  8776. ΓòÉΓòÉΓòÉ 12.108. 3138 invalid filename '%s' ΓòÉΓòÉΓòÉ
  8777.  
  8778.  
  8779. The linker performs a simple filename validation whenever a filename is 
  8780. specified to the linker.  For example, a directory specification is not a valid 
  8781. filename. 
  8782.  
  8783.  
  8784. ΓòÉΓòÉΓòÉ 12.109. 3139 cannot have both 16-bit and 32-bit object files ΓòÉΓòÉΓòÉ
  8785.  
  8786.  
  8787. It is impossible to mix 16-bit code and 32-bit code in the same executable when 
  8788. generating a QNX executable file. 
  8789.  
  8790.  
  8791. ΓòÉΓòÉΓòÉ 12.110. 1140 invalid message number ΓòÉΓòÉΓòÉ
  8792.  
  8793.  
  8794. An invalid message number has been specified in a "DISABLE" directive. 
  8795.  
  8796.  
  8797. ΓòÉΓòÉΓòÉ 12.111. 1141 virtual function table record for %s mismatched ΓòÉΓòÉΓòÉ
  8798.  
  8799.  
  8800. The linker performs a consistency check to ensure that the C++ compiler has not 
  8801. generated incorrect virtual function information.  If the message is issued, 
  8802. please report this problem. 
  8803.  
  8804.  
  8805. ΓòÉΓòÉΓòÉ 12.112. 1143 not enough memory to sort map file symbols ΓòÉΓòÉΓòÉ
  8806.  
  8807.  
  8808. There was not enough memory for the linker to sort the symbols in the "Memory 
  8809. Map" portion of the map file.  This will only occur when the "SORT GLOBAL" 
  8810. option has been specified. 
  8811.  
  8812.  
  8813. ΓòÉΓòÉΓòÉ 12.113. 1145 %S is both pure virtual and non-pure virtual ΓòÉΓòÉΓòÉ
  8814.  
  8815.  
  8816. A function has been declared both as "pure" and "non-pure" virtual. 
  8817.  
  8818.  
  8819. ΓòÉΓòÉΓòÉ 12.114. 2146 %s is an invalid object file ΓòÉΓòÉΓòÉ
  8820.  
  8821.  
  8822. Something was encountered in the object file that cannot be processed by the 
  8823. linker. 
  8824.  
  8825.  
  8826. ΓòÉΓòÉΓòÉ 12.115. 3147 Ambiguous format specified ΓòÉΓòÉΓòÉ
  8827.  
  8828.  
  8829. Not enough of the FORMAT directive attributes were specified to enable the 
  8830. linker to determine the executable file format.  For example, 
  8831.  
  8832.  
  8833.    FORMAT OS2 
  8834.  
  8835. will generate this message. 
  8836.  
  8837.  
  8838. ΓòÉΓòÉΓòÉ 12.116. 1148 Invalid segment type specified ΓòÉΓòÉΓòÉ
  8839.  
  8840.  
  8841. The segment type must be one of CODE or DATA. 
  8842.  
  8843.  
  8844. ΓòÉΓòÉΓòÉ 12.117. 1149 Only one debugging format can be specified ΓòÉΓòÉΓòÉ
  8845.  
  8846.  
  8847. The debugging format must be one of WATCOM, Codeview, Dwarf (default), or 
  8848. Novell.  You cannot specify multiple debugging formats. 
  8849.  
  8850.  
  8851. ΓòÉΓòÉΓòÉ 12.118. 1150 file %s has code for a different processor ΓòÉΓòÉΓòÉ
  8852.  
  8853.  
  8854. An object file has been encountered which contains code compiled for a 
  8855. different processor (e.g., an Intel application and an Alpha object file). 
  8856.  
  8857.  
  8858. ΓòÉΓòÉΓòÉ 12.119. 2151 big endian code not supported ΓòÉΓòÉΓòÉ
  8859.  
  8860.  
  8861. Big endian code is not supported by the linker. 
  8862.  
  8863.  
  8864. ΓòÉΓòÉΓòÉ 12.120. 2152 no dictionary found ΓòÉΓòÉΓòÉ
  8865.  
  8866.  
  8867. No symbol search dictionary was found in a library that the linker attempted to 
  8868. process. 
  8869.  
  8870.  
  8871. ΓòÉΓòÉΓòÉ 12.121. 2154 cannot execute %s1 :  %s2 ΓòÉΓòÉΓòÉ
  8872.  
  8873.  
  8874. An attempt by the linker to spawn another application failed.  The application 
  8875. is specified by "%s1" and the reason for the failure is specified by "%s2". 
  8876.  
  8877.  
  8878. ΓòÉΓòÉΓòÉ 12.122. 2155 relocation at %a to an improperly aligned target ΓòÉΓòÉΓòÉ
  8879.  
  8880.  
  8881. Some relocations in Alpha executables require that the object be aligned on a 4 
  8882. byte boundary. 
  8883.  
  8884.  
  8885. ΓòÉΓòÉΓòÉ 12.123. 2156 OPTION INCREMENTAL must be one of the first directives specified ΓòÉΓòÉΓòÉ
  8886.  
  8887.  
  8888. The option must be specified before any option or directive which modifies the 
  8889. linker's symbol table (e.g., IMPORT, EXPORT, REFERENCE, ALIAS). 
  8890.  
  8891.  
  8892. ΓòÉΓòÉΓòÉ 12.124. 3157 no code or data present ΓòÉΓòÉΓòÉ
  8893.  
  8894.  
  8895. The linker requires that there be at least 1 byte of either code or data in the 
  8896. executable. 
  8897.  
  8898.  
  8899. ΓòÉΓòÉΓòÉ 12.125. 1158 problem adding resource information ΓòÉΓòÉΓòÉ
  8900.  
  8901.  
  8902. The resource file is invalid or corrupt. 
  8903.  
  8904.  
  8905. ΓòÉΓòÉΓòÉ 12.126. 3159 incremental linking only supports DWARF debugging information ΓòÉΓòÉΓòÉ
  8906.  
  8907.  
  8908. When OPTION INCREMENTAL is used, you cannot specify non-Dwarf debugging 
  8909. information for the executable.  You must specify DEBUG DWARF when requesting 
  8910. debugging information. 
  8911.  
  8912.  
  8913. ΓòÉΓòÉΓòÉ 12.127. 3160 incremental linking does not support dead code elimination ΓòÉΓòÉΓòÉ
  8914.  
  8915.  
  8916. When OPTION INCREMENTAL is used, you cannot specify OPTION ELIMINATE. 
  8917.  
  8918.  
  8919. ΓòÉΓòÉΓòÉ 12.128. 1162 relocations on iterated data not supported ΓòÉΓòÉΓòÉ
  8920.  
  8921.  
  8922. An object file was encountered that contained an iterated data record that 
  8923. requires relocation.  This is most commonly caused by a module coded in 
  8924. assembly language. 
  8925.  
  8926.  
  8927. ΓòÉΓòÉΓòÉ 12.129. 1163 module has not been compiled with the "zv" option ΓòÉΓòÉΓòÉ
  8928.  
  8929.  
  8930. When OPTION VFREMOVAL is used, all object files must be compiled with the "zv" 
  8931. option.  The linker has detected an object file that has not been compiled with 
  8932. this option. 
  8933.  
  8934.  
  8935. ΓòÉΓòÉΓòÉ 12.130. 3164 incremental linking does not support virtual function removal ΓòÉΓòÉΓòÉ
  8936.  
  8937.  
  8938. When OPTION INCREMENTAL is used, you cannot also specify OPTION VFREMOVAL. 
  8939.  
  8940.  
  8941. ΓòÉΓòÉΓòÉ 12.131. 1165 resource file %s too big ΓòÉΓòÉΓòÉ
  8942.  
  8943.  
  8944. The resource file specified in OPTION RESOURCE was too big to fit inside the 
  8945. QNX executable.  The maximum size is approximately 32000 bytes. 
  8946.  
  8947.  
  8948. ΓòÉΓòÉΓòÉ 12.132. 2166 both %s1 and %s2 marked as starting symbols ΓòÉΓòÉΓòÉ
  8949.  
  8950.  
  8951. If the linker sees that there is more than one starting address specified in 
  8952. the program and they have symbol names associated with them, it will emit this 
  8953. error message.  If there is more than one starting address specified and at 
  8954. least one of them is unnamed, it will issue message 2030.