The "linking" is the process that produces a linked system model out of the unlinked multi-output Unit Process datasets of the ecoinvent database. The linking follows a series of steps; some of them are common for all system models, while others are specific to each system model. You can read more about the linking rules in the Chapter 14 of the Data Quality Guidelines.
As simplified common rules: first, all the Materials for Treatment will be moved to the input side, with a negative sign. Then, all inputs and outputs will be linked to the corresponding market activities (unless an Activity Link has been specified as a Direct Link for the exchange). In the case of attributional system models, all suppliers will be linked to the markets, regardless their level of technology.
Specific Rules for Attributional System Models
Specifically in the allocation-based system models, all marketable by-products yielded in treatment activities will be moved into the activities producing the treated material for treatment as waste in a process called allocation at the point of substitution. Similarly, in the case of Specialty Productions, the reference product of the activity will be handled from now on as a by-product of an ordinary treatment activity.
Then, all multi-output activities are allocated (using the allocation criteria defined for the specific System Model). This allocation is happening at the point of substitution, and the marketable by-products issued in treatment activities get allocated in the activities they have been moved into.
After allocation, all activities producing the same marketable by-product yielded from a treatment activity get aggregated and are grouped into a single dataset that bears the original name of the treatment activity.