The invention discloses a
byte order adjustment method in
binary translation, belonging to the technical field of computers, which comprises the following steps: loading a source program
executable image by the execution engine of a dynamic
binary translation system, adjusting the
byte orders of the contents of each
program segment, and synchronously adjusting the number of loaded parameters, contents of the parameters and environmental variables; modifying the effective address of an intermediate command representing
internal memory access so that the expression of the modified effective address accords with the semantic of the
internal memory access of a source program so as to load or store correct data in an
internal memory; translating the source program command into the intermediate command by a front decoder, adding the generated intermediate command to a constructed intermediate command
basic block until the occurrence of direct skip or
system call, finishing the construction of the current
basic block, and sending the
basic block to a back end for executing. The invention avoids the flitting of
byte orders of internal memory data by using the method for modifying internal
memory address, has high efficiency,
correctness and commonality in the field of
binary translation.