| Symbols to Control the Linker

Previous | The TIGCC Linker | Next

In addition to options specified in the command line, the TIGCC linker can be controlled using special symbol names. They should be used directly only in assembly programs; C programs should rely on the appropriate library facilities if they are available.
These are the symbols the linker treats as control symbols:

- __ref_all_...
- _tigcc_native
- _nostub
- _nostub_dll
- _fargo
- _flash_os
- _library
- _ti92, _ti89, _ti92plus, _v200
- _flag_...
- _version...
- ...@version..., ...__version...
- __ld_use_fline_jumps
- __ld_use_4byte_fline_jumps
- __ld_omit_bss_init
- __ld_ignore_global_imports

Symbols can be created in a variety of ways; they can be:

- labels;
- undefined exported symbols;
- imported (used but undefined) symbols;
- common symbols.

Not all assemblers support all types of symbols; for example, the A68k assembler does not support exporting symbols which are not defined somewhere in the same file. This assembler is also somewhat special from the linker's point of view: It only outputs exported and imported symbols by default; local labels can be supplied in a symbol table, but since it is optional, the linker does not use it to receive control information.
If a symbol is detected as a control symbol, it is not imported into the internal data structures as usual. There are two reasons for this: First, if a user accidentally defines a control symbol somewhere (some traditional control symbol names are quite short), the resulting error can help detect this problem. Second, if common symbols are used, they would waste space in the executable otherwise.