| __ld_insert_fargo021_libs

Previous | Automatically Inserted Section Contents | Next

__ld_insert_fargo021_libs can be used to handle library calls. It inserts references to libraries in the format used by Fargo v0.2.1:

- 2 bytes: number of referenced libraries
- 2 bytes: program-relative location of the null-separated null-terminated library name list
- For each referenced library...
  - For each imported function/variable...
    - Compressed index of the function/variable. The format is not the same as for the relocation table. It is encoded using one of the following formats:
      - 1 byte: offset (must be between 0x01 and 0x7F)
      - 2 bytes: offset + 0x8000 (must be between 0x8000 and 0xFFFF)
      where offset is the index plus 1 for the first index, and the difference between the index and the previous index for the following ones.
    - A compressed relocation table for this function/variable. See __ld_insert_compressed_relocs for the format used. The reference symbol used if there is no previous reloc (i.e. for the first reloc) is `__ld_fargo021_libs_ref`. It is expected by Fargo to be at a fixed position: the position of the format flag in the Fargo header. This is currently handled by the definition of the Fargo header.
  - 2 bytes: 0
- 2 bytes: 0

The libraries have to be processed using the method described in __ld_insert_kernel_libs, except that library versions are not implemented by this format.
Note: This insertion is available only if Fargo support is compiled in.

See also: __ld_insert_fargo020_libs, __ld_insert_kernel_libs