home *** CD-ROM | disk | FTP | other *** search
/ World of A1200 / World_Of_A1200.iso / programs / develop / phxlnk / phxlnk.doc < prev    next >
Text File  |  1995-02-27  |  4KB  |  139 lines

  1.  
  2.                   P h x L n k
  3.  
  4.             AMIGA-DOS Module Linker
  5.  
  6.  
  7.  
  8. Contents
  9. --------
  10.  
  11. I.    Introduction
  12. II.   Usage
  13. III.  Bugs
  14.  
  15.  
  16.  
  17. I. Introduction
  18. ===============
  19.  
  20. PhxLnk was written in pure assembler-code, assembled with PhxAss and linked
  21. with BLink (first version) and PhxLnk itself. It supports all features of a
  22. standard Amiga-DOS linker (like BLink), except of overlay hunks (HUNK_OVERLAY)
  23. and library hunks (HUNK_LIB, HUNK_INDEX).
  24.  
  25. PhxLnk is FREEWARE and copyright © 1992,93 by Frank Wille.
  26. Commercial usage of this program is strictly forbidden!
  27.  
  28.  
  29.  
  30. II. Usage
  31. =========
  32.  
  33. The linker can be used from CLI only. You may copy it to the C-directory of
  34. your workdisk, then type :
  35.  
  36.    PhxLnk [<-options>] <object- or library-module names ...>
  37.  
  38. to start PhxLnk. Starting PhxLnk with no argument or with a single '?' will
  39. display a short instruction.
  40.  
  41. There are two types of modules which can be linked:
  42. o  Object modules with extension ".o" or ".obj" which normally consist of one
  43.    unit. PhxLnk also links object modules with several units.
  44. o  Library modules with extension ".lib" which can consist of any number of
  45.    units. PhxLnk will only include units, if at least one ext_def-symbol is
  46.    referenced in an object module unit or in an already included library unit.
  47.  
  48. The module names can appear in any order, provided the first is an object
  49. module which contains the startup code.
  50.  
  51.  
  52. Options:
  53.  
  54. -o<Name>    Sets the name of the output file. If not specified, the output
  55.         name is the name of the first module without extension,
  56.         e.g. "phxlnk prog1.o prog2.o c.lib m.lib"  will produce a load-
  57.         file with the name "prog1".
  58.  
  59. -a        This option forces all sections to be loaded to Chip-Memory.
  60.  
  61. -c        Normally only the sections of the same type and name will be
  62.         linked together. -c ignores the names of the Code sections,
  63.         they will be linked to one large Code section. Usually -c is set
  64.         when using small-code model.
  65.  
  66. -d        As with -c the section names are ignored, but now for the Data and
  67.         Bss sections. Data and Bss will not be mixed! This large section
  68.         will contain first all the Data and then all the Bss.
  69.         Important! When PhxLnk creates the load-file, only the Data-part of
  70.         this section will be written.
  71.         After a LoadSegment() the Bss-part is completely uninitialized!
  72.         You will have to clear it using the special Linker-Symbols
  73.         _DATA_BAS_, _DATA_LEN_ and _BSS_LEN_ (see Linker-Symbols for more
  74.         information).
  75.         All references to, or symbols of this section will be calculated
  76.         as if the Bss sections were directly behind the Data.
  77.         -d will be needed when using the near-data model for both Data and
  78.         Bss sections.
  79.  
  80. -s        The hunk_symbol($3f0) and hunk_debug($3f1) blocks which contain
  81.         information for a debugger will not be written to the load-file.
  82.  
  83. -b<num>     Sets the maximum number of sections per unit to <num>. The default
  84.         value is 16 (which should be enough for most cases).
  85.  
  86.  
  87. Linker-Symbols:
  88.  
  89. The linker itself creates one ext_def($01xxxxxx) and two ext_abs($02xxxxxx)
  90. symbols which will be needed by the startup code of a program using the small-
  91. data model.
  92.  
  93. _DATA_BAS_  (ext_def) Base address of the small-data section.
  94. _DATA_LEN_  (ext_abs) Length of the Data-part of the small-data section.
  95. _BSS_LEN_   (ext_abs) Length of the Bss-part of the small-data section.
  96.  
  97.  
  98. Small-Data:
  99.  
  100. Small-data symbols can be accessed in a range of 65534 ($fffe) bytes. When a
  101. symbol is outside of this range, the linker will display an error.
  102. The small-data model must be initialized by the startup code. When you're
  103. using A4 as small-data pointer, the initialization would look like this:
  104.  
  105.  lea     SmallDataBase,a4
  106.  lea     32766(a4),a4
  107.  
  108. Don't write "lea  SmallDataBase+32766,a4". Some assemblers could change this
  109. address during optimization.
  110. I chose 32766 instead of 32768, because this is the way most assemblers and
  111. linkers do it (e.g. DICE).
  112.  
  113.  
  114.  
  115. III. Bugs
  116. =========
  117.  
  118. None?
  119.  
  120. The linker does not support overlay- and library-hunks, something which could
  121. be added in future updates.
  122.  
  123. If any errors or questions occur, please write to :
  124.  
  125.             Frank Wille
  126.             Auf dem Dreische 45
  127.             32049 Herford
  128.             GERMANY
  129.            __
  130.           ///
  131.          ///
  132.         ///
  133.    __       ///
  134.    \\\      ///
  135.     \\\  ///
  136.      \\\///
  137.       \XX/      A M I G A   F O R E V E R  !
  138.  
  139.