The invention discloses a method for replacing a compiling chain order based on a mixed-compiling
order set, which comprises the following steps: 1) designing more than one replacing order or a replacing order sequence with identical functions and different skip ranges and capable of enabling a processor
program counter to overlook useless space according to a replaced order; 2) calculating address distance between the replaced order and a skip target, choosing a corresponding replacing order or a replacing order sequence according to a choice rule and replacing the replaced order, wherein the useless space refers to unused target document space generated after the replaced order is replaced, and the replaced order is a skip order or / and a
branch order. The choice rule in step 2) is that the address distance between the replaced order and the skip target is within the skip range and
time cost with order performance is the least. In an assembling process, when the address distance between the replaced order and the skip target in step 2) can not be calculated, a maximum space is reserved in the target document and
relocation information A, B and C are generated for a
linker. In a link process, the address distance is re-calculated, and the order is replaced according to the choice rule. The
relocation information A is used for an assembler to analyze local symbols, the
relocation information B is used for analyzing a target symbol by means of a constant in the link process, and the relocation information C is used for performing order replacement in the link process. The maximum space refers to the total amount of space occupied by an order or an order sequence with the largest skip range.