| __ld_insert_compressed_relocs

Previous | Automatically Inserted Section Contents | Next

__ld_insert_compressed_relocs inserts relocs in a compressed format known from Fargo. For more information on inserting and processing relocs, see __ld_insert_kernel_relocs.
In the following format description, offset refers to the difference in words (half of the difference in bytes) between the start of this reloc and the end of the previous reloc. If there is no previous reloc (i.e. for the first reloc), offset is the distance in words between this reloc and the symbol `__ld_compressed_relocs_ref`. This symbol must be exported to be found. If it is not found, the entry point is used instead (see __ld_entry_point).

- For each relocation entry...
  - If we are inside a nibble sequence (see below):
    - 1 nibble (1/2 byte): offset
  - Else: Any of the following, whichever fits:
    - 1 byte: offset + 1 (must be between 0x01 and 0x7F)
    - 1 byte:
      - 1st nibble: nibble_count / 2 + 0x6 (must be between 0x8 and 0xB)
      - 2nd nibble: offset
      A nibble sequence of nibble_count nibbles follows (see above).
    - 2 bytes: offset + 0xBF81 (must be between 0xC000 and 0xFFFE)
    - A variable-length sequence:
      - 2 bytes: 0xFFFF
      - Any of the four possibilities, with offset decreased by 0x407E
- 1 byte: 0

Note: The limitations of __ld_insert_kernel_relocs also apply to this insertion.

See also: __ld_insert_compressed_bss_refs, __ld_insert_compressed_data_refs, __ld_insert_kernel_relocs