首页>
外国专利>
Method of executing program code where a portion of the target code calls a native code portion which then calls a second target code portion.
Method of executing program code where a portion of the target code calls a native code portion which then calls a second target code portion.
In dynamic binary program code conversion, subject code 17 is translated into target code 21 for execution on a target processor 13. When the subject code is executed, a portion of the code calls a portion of native code such as library function NFuncA 272 to replace subject code portion SFuncA 172. The native function then calls a second portion of the subject code SFuncB 173 instead of native function NFuncB 273. The method then returns from executing the second portion of the subject code to the native code and then returns from executing the native code to the first portion of the subject code. The method may include the steps of determining whether to execute the second subject code portion or a second native code portion and linking the code portion as required. The code portions may be library functions. The step of determining may include using a reverse bind point description which includes an identification of a native function as the second native code portion to be reverse bound and an identification of a subject function to be called as the second subject code portion instead of the native function. The method may include the steps of transforming some of the first function's parameters from a target code representation to a native code representation and invoking the first native library function with the transformed parameters according to a prototype of the first native library function.
展开▼