| Automatically Inserted Section Contents

Previous | The TIGCC Linker | Next

The TIGCC linker can insert certain variable-length data into the contents of sections. If a symbol (i.e., a label) at the end of a section is recognized as an insertion point, then the linker appends the data specified by the symbol name. If the symbol is not at the end of a section, the insertion will fail without notice, since these contents may have been inserted automatically already.
You may refer to an insertion symbol even if you did not put a label at a specific place. In this case, the data is written to an arbitrary place (usually the end of the program, but do not rely on this). However, all object files and archives are searched for exported symbols with this name first, to avoid duplication of the data.
This method is only used if some program-related data cannot be expressed using simple built-in symbols. It should be used with care, as the inserted data may be invalid under certain circumstances. The format of the data is fixed and usually represents some already established data format, but new data formats may be developed on demand. The insertion symbols which are currently recognized are:

- __ld_insert_kernel_relocs
- __ld_insert_mlink_relocs
- __ld_insert_compressed_relocs
- __ld_insert_fargo021_relocs
- __ld_insert_kernel_bss_refs
- __ld_insert_mlink_bss_refs
- __ld_insert_compressed_bss_refs
- __ld_insert_fargo020_bss_refs
- __ld_insert_fargo021_bss_refs
- __ld_insert_kernel_data_refs
- __ld_insert_mlink_data_refs
- __ld_insert_compressed_data_refs
- __ld_insert_kernel_rom_calls
- __ld_insert_mlink_rom_calls
- __ld_insert_compressed_rom_calls
- __ld_insert_kernel_ram_calls
- __ld_insert_kernel_libs
- __ld_insert_fargo020_libs
- __ld_insert_fargo021_libs
- __ld_insert_kernel_exports
- __ld_insert_fargo_exports
- __ld_insert_preos_compressed_tables
- __ld_insert_nostub_comments
- __ld_insert_data_var_name