The invention discloses a link method and a linker, which belong to the field of software security. The method comprises the following steps: scanning the objective program codes of software to be protected, wherein the codes are generated after the compiling of a compiler; determining the inserting point of the identification codes of an intelligent key facility, and inserting the identificationcodes in the objective program codes; creating a segment table and a symbol table according to scanning information, adding symbols respectively corresponding to identification code functions and exitfunctions in the symbol table, and using the functions to which the identification codes belong to identify the intelligent key facility; if successful, allowing the software to operate, and if fail,calling the exit functions and completing the operation; repositioning the objective program codes, writing the head information of a file, the repositioned objective program codes, the segment tableand the symbol table in an output file to obtain an executable file. The linker comprises a scanning module, an insertion module, a creation module and a repositioning module. The invention realizessoftware protection, simplifies and reduces the complexity and the difficulty of software protection.