A linkage convention is computing term that means an agreement which is made between a caller and a callee. The agreement describes:
  • how the caller should pass parameters to the callee
  • what assumptions the callee is allowed to make about the values in the machine registers at the moment of the call
  • who should preserve registers which are modified by the callee and/or which are important to the caller so that their original values are available when the caller needs them
  • how and where registers should be preserved
  • how the callee knows where to return to when it is ready to return to the caller
  • how the callee returns a value to the caller if the routine is a function (as opposed to a subroutine which has no return value)
  • how a debugger will find the information necessary to obtain a stack trace
Like most agreements, if one of the parties doesn't adhere to the agreement then things don't work very well (i.e. the program will almost certainly fail).

Good linkage conventions are used for most if not all programming languages on a system. It would be impossible to write a compiler for any programming language if no linkage convention has been defined for the language. It would also be impossible to call system calls or library calls without a linkage convention.

This term seems to have fallen out of 'normal' practice. It seems to have been replaced by "function call sequence", "calling sequence" or calling convention.