| _exit

Previous | Symbols Built into the TIGCC Linker | Next

Usually, this symbol is not handled in a special way. However, if it does not exist at all, it is redirected to the entry point of the program. The effect is that constructs of the form

    .word _exit-entry_point

resolve to 0 if the symbol is undefined.
The kernel headers of the standard library reference this symbol as the program/library destructor. For kernel programs and libraries, it is called whenever the program exits or the library is unloaded.