insert_fargo021_libs.hss 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. [Main]
  2. Title=__ld_insert_fargo021_libs
  3. See Also=insert_fargo020_libs: __ld_insert_fargo020_libs, insert_kernel_libs: __ld_insert_kernel_libs
  4. [Top]
  5. __ld_insert_fargo021_libs can be used to handle
  6. <A HREF="$$LINK(symbols_lib_call)">library calls</A>. It inserts references
  7. to libraries in the format used by Fargo v0.2.1:
  8. <UL>
  9. <LI><B>2 bytes:</B> number of referenced libraries</LI>
  10. <LI><B>2 bytes:</B> program-relative location of the null-separated
  11. null-terminated library name list</LI>
  12. <LI>For each referenced library...
  13. <UL>
  14. <LI>For each imported function/variable...
  15. <UL>
  16. <LI>Compressed <I>index</I> of the function/variable. The format is
  17. <I>not</I> the same as for the relocation table. It is encoded
  18. using <I>one</I> of the following formats:
  19. <UL>
  20. <LI><B>1 byte:</B> <I>offset</I> (must be between 0x01 and
  21. 0x7F)</LI>
  22. <LI><B>2 bytes:</B> <I>offset</I> + 0x8000 (must be between
  23. 0x8000 and 0xFFFF)</LI>
  24. </UL>
  25. where <I>offset</I> is the index plus 1 for the first index, and
  26. the difference between the index and the previous index for the
  27. following ones.</LI>
  28. <LI>A compressed relocation table for this function/variable. See
  29. <A HREF="$$LINK(insert_compressed_relocs)">__ld_insert_compressed_relocs</A>
  30. for the format used.
  31. The reference symbol used if there is no previous reloc (i.e. for
  32. the first reloc) is <CODE>__ld_fargo021_libs_ref</CODE>. It is
  33. expected by Fargo to be at a fixed position: the position of the
  34. format flag in the Fargo header. This is currently handled by the
  35. definition of the Fargo header.</LI>
  36. </UL></LI>
  37. <LI><B>2 bytes:</B> 0</LI>
  38. </UL></LI>
  39. <LI><B>2 bytes:</B> 0</LI>
  40. </UL>
  41. The libraries have to be processed using the method described in
  42. <A HREF="$$LINK(insert_kernel_libs)">__ld_insert_kernel_libs</A>, except that
  43. library versions are not implemented by this format.
  44. <BR><BR>
  45. <B>Note:</B> This insertion is available only if Fargo support is compiled
  46. in.