In computer science, link time refers to the period of time, during the creation of a computer program, in which a linker is being applied to that program. Link time occurs after compile time and before runtime (when a program is executed).
It is common to speak of link time operations (the operations performed by a linker) or link time requirements (programming language requirements that must be met by compiled source code for it to be successfully linked).
Link time operations
The operations performed at link time usually include fixing up the addresses of externally referenced objects and functions, various kinds of cross module checks (e.g. type checks on externally visible identifiers and in some languages instantiation of templates). Some optimizing compilers delay code generation until link time because it is here that information about a complete program is available to them. Resolving external variables in a program is also done at link time.
The link-time optimization (LTO), when enabled, occurs at link time.
Link time requirements
The definition of a programming language may specify link time requirements that source code must meet to be successfully compiled (e.g. the maximum number of characters in an externally visible identifier that must be considered significant).
- Liberty, Jesse (2001). Sams Teach Yourself C++ in 24 Hours. Sams Publishing. p. 16. ISBN 9780672322242. https://books.google.co.uk/books?id=hklfknZ02eMC&pg=PA16&dq=%22link+time%22+%22compiler%22&hl=en&sa=X&redir_esc=y#v=onepage&q=link-time&f=false.
- Rudd, David (1994). Introduction to Software Design and Development with ADA. West Pub.. pp. 24-25. ISBN 9780314028297. https://books.google.co.uk/books?redir_esc=y&id=LnTZAAAAMAAJ&dq=%22link+time%22+%22compiler%22+%22linker%22+%22introduction%22&focus=searchwithinvolume&q=link-time.
- Stroustrup, Bjarne (2014). Programming: Principles and Practice Using C++. Addison-Wesley Professional. p. 51. ISBN 9780133796742. https://books.google.co.uk/books?id=We21AwAAQBAJ&pg=PA134&dq=%22link+time%22+%22compiler%22+%22linker%22+%22introduction%22&hl=en&sa=X&redir_esc=y#v=onepage&q=link-time&f=false.
Original source: https://en.wikipedia.org/wiki/ Link time. Read more