CN101937355A - Heterogeneous program interactive method based on dynamic binary translation - Google Patents
Heterogeneous program interactive method based on dynamic binary translation Download PDFInfo
- Publication number
- CN101937355A CN101937355A CN2010102712661A CN201010271266A CN101937355A CN 101937355 A CN101937355 A CN 101937355A CN 2010102712661 A CN2010102712661 A CN 2010102712661A CN 201010271266 A CN201010271266 A CN 201010271266A CN 101937355 A CN101937355 A CN 101937355A
- Authority
- CN
- China
- Prior art keywords
- program
- platform
- isomery
- function
- binary translation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Devices For Executing Special Programs (AREA)
Abstract
The invention belongs to the field of computer system software and particularly relates to a heterogeneous program interactive method based on dynamic binary translation. The method utilizes a cross-platform executive program and a dependent dynamic binary translation tool to carry out the interaction between heterogeneous platform programs, namely utilizing the characteristic that the cross-platform program is completely controlled by the dynamic binary translation tool in translation and execution to realize the mutual calling of native codes and cross-platform codes. By using the method, the interaction between internal and external programs of the dynamic binary translation tool is realized, the cross-platform heterogeneous programs can be mutually called and cooperate with each other, thus perfecting the cross-platform binary multiplexing of the heterogeneous programs. The method is beneficial to a non-mainstream platform, especially a system which adopts an independently developed processor as a core, and can realize rapid support to the existing binary program. In addition, the development cost investment required by the practicability and popularity of the platforms can be effectively reduced.
Description
Technical field
The invention belongs to the computer system software technical field, be specifically related to a kind of isomery program interaction method based on binary translation.
Background technology
In recent years, along with China in processor chips designs with make field man power and material's continuous input, have independent intellectual property right " China Chip " obtained huge development.Godson general processor chip with Computer Department of the Chinese Academy of Science's research and development is an example, not only be applied in the high-performance processor field, and the Godson processor of multinuclear version is also succeeded in developing.Present China's gap with world lead level that constantly furthering in chip design and manufacturing field.But with the processor chips of independent research is that the computing platform of core will be applied in more wide scope, thereby the common treatment applicator platform that real challenge has dominant position now also must overcome upper layer software (applications) and use deficient key issue.With the Intel processor is the development of the conventional process applicator platform of representative through many decades, and not only from have the leading position on the processor design and fabrication technology, the application program of its upper binding is millions of especially.No matter be up-to-date intention software or well accepted classical software, often all be to be that target is designed, and only issue binary executable at this platform with main flow platform.Can therefore high efficient and convenient support existing these isomery binary programs, be to facilitate the key of competing the user based on from the platform and the main flow platform of host processor chip.
Existing solution has following several, but all has open defect.First kind is to realize above-mentioned application again by special developer on autonomous platform.Obviously this method is all unrealistic on resource and cost.Second kind is to rely on the community that increases income to provide the compatibility with source code to realize, recompilates on target platform then and generates binary executable.At first, therefore can't guarantee the support that application program obtains continuing because the community that increases income can't provide effective maintenance for compatible program.Difference between secondly compatible realization and original program also can cause the decline of user experience.The last compatible potential problems such as security, stability and program feature of realizing also existing.Last a kind of binary translation technology that is to use is translated into the target platform binary program with the binary program on the source platform, then operation.This method has the versatility advantage, and can loyal reaction original program function.The binary translation instrument that with QUME is representative is supported on a plurality of platforms.The major defect of this method is that existing binary translation instrument can not support to exist mutual isomery program, promptly the binary program on the heterogeneous platform needs and local program carries out alternately, such as calling background data base or operate that the local hardware driving prints etc.
Summary of the invention
The problem that the present invention mainly solves is how to realize striding the binary translation instrument to carry out inside and outside program interaction, thereby improves the cross-platform versatility of isomery program.
Carry out because existing binary translation instrument has only been considered the translation of heterogeneous platform program in design, therefore in the process of implementation, every by this routine call to any code all can carry out binary translation.The outside local program also can't directly be called the heterogeneous platform program simultaneously, because be that variation has all taken place for function entrance or parameter transmission.
For addressing the above problem, the technical solution adopted in the present invention is: based on existing binary translation instrument, module when expansion translation is wherein resolved and moved promptly increases mutual expansion module of isomery and mutual jump list, and overall architecture as shown in Figure 3.
The isomery program interaction method based on binary translation that the present invention proposes utilizes cross-platform executive routine to carry out mutual between the heterogeneous platform program with the binary translation instrument that relies on exactly.
Among the present invention, the described exchange method that carries out between the heterogeneous platform program is: utilize cross platform program all to be subjected to the characteristics that the binary translation instrument is controlled fully in translation and execution, realize calling mutually of local code and cross-platform code.
Isomery program interaction method based on binary translation of the present invention, wherein, extended dynamic binary translation instrument is for the translation of function call, intercepts and captures all cross platform programs to the calling of external program, and the process of proxy call.
Isomery program interaction method based on binary translation of the present invention wherein, for the binary translation instrument provides packing support to the cross platform program function interface, realizes the local compatibility of calling with the cross platform program external interface.
Isomery program interaction method based on binary translation of the present invention comprises on the specific implementation: the inner isomery program of outside local routine call and two aspects of inner isomery routine call outside local program.
The inner isomery program of outside local routine call: for this kind interactive mode, the calling interface that inner isomery program often needs to expose agreement by system service initiates to call for other programs.The mode of creating interface depends on the system of operation, such as linux system many with file as calling interface, the Windows system is then in the majority as interface with registry entry.Therefore need expand the binary translation instrument, intercept and capture the interface creation operation of isomery program.The interface operation that this is manipulated under the home environment is simulated then.And need all local interfaces of monitoring, and the isomery routine interface is handled function calls when receiving to be converted into when local program calls by the isomery program creation.Call related parameter and need carry out suitable conversion, position, size and sequential scheduling agreement such as storage all may there are differences under different platform.
Inner isomery routine call outside local program:, at first need the interface specification of unified External Program Interface under isomerous environment for this kind interactive mode.When the isomery program is loaded,, note all outside call instructions of isomery program by expansion for the binary translation instrument.And the destination address and the outside local interface of these call instructions is mapped one by one.Monitor the execution of these call instructions then when operation, interactive module is according to the corresponding relation calling external program when call instruction is triggered.Call the processing of parameters needed transmission need carry out calling inner isomery program as the said external local program equally the time, unique difference is that the mode of handling needs to reverse.
The invention has the beneficial effects as follows, effectively realized the mutual of the inside and outside program of binary translation instrument, make and to call mutually and to cooperate between cross-platform isomery program, thereby the cross-platform scale-of-two that improves the isomery program is multiplexing.The present invention helps non-mainstream platform, especially is the system of core with the independent research processor, realizes the quick support to existing binary program.And can effectively reduce march toward practicability and obtain popularizing required cost of development input of these platforms.
Description of drawings
Fig. 1 is the schematic flow sheet of heterogeneous platform routine call target platform program.
Fig. 2 is the schematic flow sheet of target platform routine call heterogeneous platform program.
Fig. 3 is the configuration diagram of heterogeneous platform program interaction expansion.
Embodiment
The present invention is further described below in conjunction with drawings and Examples.
As shown in Figure 1, the function with heterogeneous platform routine call target platform is an example.In the link stage, the binary translation instrument is judged in the heterogeneous platform program the target platform function calls, and can insert the address of target platform function.In the operation phase first step, heterogeneous platform routine call target platform function, the binary translation instrument is skipped the translating phase, activates the mutual expansion module of isomery.In second step, the mutual expansion module of isomery is judged the legitimacy of this address according to the mutual jump list of address check, and finds corresponding target platform function.The 3rd step, according to function parameters quantity and type, parameter is carried out cross-platform conversion process, and the invocation target stage function.In the 4th step, after the target platform function returns, receive its rreturn value.The 5th step returned to the heterogeneous platform program with rreturn value, and carried out return.
As shown in Figure 2, the function with target platform routine call heterogeneous platform is an example.The first step, the heterogeneous platform function that the target platform program is called needs is committed to the mutual expansion module of isomery.In second step, the asynchronous interactive expansion module finds corresponding function entrance in mutual jump list, and checks its legitimacy.The 3rd step, according to function parameters quantity and type, parameter is carried out cross-platform conversion process, the line function of going forward side by side calls.In the 4th step, the mutual expansion module of isomery is intercepted and captured the return after the heterogeneous platform function call finishes, and receives its rreturn value.The 5th goes on foot, and rreturn value is returned to the call function of target platform.
Claims (6)
1. isomery program interaction method based on binary translation is characterized in that: utilize cross-platform executive routine to carry out mutual between the heterogeneous platform program with the binary translation instrument that relies on.
2. the isomery program interaction method based on binary translation according to claim 1, it is characterized in that described mutual method of carrying out between the heterogeneous platform program is: utilize cross platform program all to be subjected to the characteristics that the binary translation instrument is controlled fully, realize calling mutually of local code and cross-platform code in translation and execution.
3. the isomery program interaction method based on binary translation according to claim 1 and 2, it is characterized in that of the translation of extended dynamic binary translation instrument for function call, intercept and capture all cross platform programs to the calling of external program, and the process of proxy call.
4. the isomery program interaction method based on binary translation according to claim 1 and 2, it is characterized in that for the binary translation instrument provides packing support to the cross platform program function interface, realize the local compatibility of calling with the cross platform program external interface.
5. the isomery program interaction method based on binary translation according to claim 1 and 2 is characterized in that comprising on the specific implementation: the inner isomery program of outside local routine call and two aspects of inner isomery routine call outside local program; Wherein:
The inner isomery program of outside local routine call: for this kind interactive mode, inner isomery program initiates to call for other programs by the calling interface that system service exposes agreement; Therefore the mode of creating interface depends on the system of operation, expand to the binary translation instrument, intercepts and captures the interface creation operation of isomery program; The interface operation that this is manipulated under the home environment is simulated then; And monitor all local interfaces, the isomery routine interface is handled function calls when receiving to be converted into when local program calls by the isomery program creation;
Inner isomery routine call outside local program:, at first will unify the interface specification of External Program Interface under isomerous environment for this kind interactive mode; When the isomery program is loaded, by expansion, note all outside call instructions of isomery program, and the destination address and the outside local interface of these call instructions is mapped one by one for the binary translation instrument; Monitor the execution of these call instructions then when operation, interactive module is according to the corresponding relation calling external program when call instruction is triggered.
6. the isomery program interaction method based on binary translation according to claim 5 is characterized in that:
During with the function of heterogeneous platform routine call target platform, in the link stage, the binary translation instrument is judged in the heterogeneous platform program the target platform function calls, inserts the address of target platform function; In the operation phase, the first step, heterogeneous platform routine call target platform function, the binary translation instrument is skipped the translating phase, activates the mutual expansion module of isomery; In second step, the mutual expansion module of isomery is judged the legitimacy of this address according to the mutual jump list of address check, and finds corresponding target platform function; The 3rd step, according to function parameters quantity and type, parameter is carried out cross-platform conversion process, and the invocation target stage function; In the 4th step, after the target platform function returns, receive its rreturn value; The 5th step returned to the heterogeneous platform program with rreturn value, and carried out return;
During with the function of target platform routine call heterogeneous platform, the first step, the heterogeneous platform function that the target platform program is called needs is committed to the mutual expansion module of isomery; In second step, the asynchronous interactive expansion module finds corresponding function entrance in mutual jump list, and checks its legitimacy; The 3rd step, according to function parameters quantity and type, parameter is carried out cross-platform conversion process, the line function of going forward side by side calls; In the 4th step, the mutual expansion module of isomery is intercepted and captured the return after the heterogeneous platform function call finishes, and receives its rreturn value; The 5th goes on foot, and rreturn value is returned to the call function of target platform.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010102712661A CN101937355A (en) | 2010-09-03 | 2010-09-03 | Heterogeneous program interactive method based on dynamic binary translation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010102712661A CN101937355A (en) | 2010-09-03 | 2010-09-03 | Heterogeneous program interactive method based on dynamic binary translation |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101937355A true CN101937355A (en) | 2011-01-05 |
Family
ID=43390702
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010102712661A Pending CN101937355A (en) | 2010-09-03 | 2010-09-03 | Heterogeneous program interactive method based on dynamic binary translation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101937355A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101189578A (en) * | 2005-06-04 | 2008-05-28 | 特兰斯蒂有限公司 | Method and apparatus for combined execution of native code and target code during program code conversion |
US20080134159A1 (en) * | 2006-12-05 | 2008-06-05 | Intel Corporation | Disambiguation in dynamic binary translation |
CN101504613A (en) * | 2009-03-12 | 2009-08-12 | 上海交通大学 | Distributed dynamic binary translation method used for limited system |
-
2010
- 2010-09-03 CN CN2010102712661A patent/CN101937355A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101189578A (en) * | 2005-06-04 | 2008-05-28 | 特兰斯蒂有限公司 | Method and apparatus for combined execution of native code and target code during program code conversion |
US20080134159A1 (en) * | 2006-12-05 | 2008-06-05 | Intel Corporation | Disambiguation in dynamic binary translation |
CN101504613A (en) * | 2009-03-12 | 2009-08-12 | 上海交通大学 | Distributed dynamic binary translation method used for limited system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6099760B2 (en) | Computer-implemented method, computer-based system, and computer program for migrating processes | |
US8819647B2 (en) | Performance improvements for nested virtual machines | |
US9766867B2 (en) | Systems and methods for improving performance of mobile applications | |
US9164735B2 (en) | Enabling polymorphic objects across devices in a heterogeneous platform | |
US8359570B2 (en) | Adaptive scripting tool | |
US9495720B2 (en) | Method and apparatus for compiling and executing an application using virtualization in a heterogeneous system | |
US20080216064A1 (en) | Method, Architecture and Software of Meta-Operating System, Operating Systems and Applications For Parallel Computing Platforms | |
EP3350696A1 (en) | Overriding a migrated method of an updated type | |
CN103678098A (en) | HADOOP program testing method and system | |
JP5886450B2 (en) | Hybrid emulation and kernel function processing system and method | |
WO2023016480A1 (en) | Code processing method under hardware memory order architecture, and corresponding apparatus | |
CN1627254A (en) | Method for debuging embedded system and equipment | |
CN106020920A (en) | Preprocessing method and system for JCVM interpreter | |
CN106550026B (en) | Network communication device and method | |
CN102455938A (en) | Method for operating Windows application software on Linux operating system of million instructions per second (MIPS) version | |
CN101937355A (en) | Heterogeneous program interactive method based on dynamic binary translation | |
JP2013506171A (en) | Object level compatibility and class resizing using semantic values | |
Neable | The. net compact framework | |
Okafor et al. | Transforming SQLITE to Run on a Bare PC. | |
TW200834419A (en) | Method and apparatus for administering a process filesystem with respect to program code conversion | |
Almajed et al. | Binary transformation of applications to run on bare PCs | |
US11954510B2 (en) | Native-image in-memory cache for containerized ahead-of-time applications | |
CN113176928B (en) | Running method and device of heterogeneous virtual machine | |
Zhang et al. | Analysis and Research on BOX64’s Core Technologies for Cross-Architecture Software Migration | |
CN102364435A (en) | Method for realizing application program interface (API) of WinCE |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C02 | Deemed withdrawal of patent application after publication (patent law 2001) | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20110105 |