CN114510267A - Program ABI interface compatibility calculation method based on Linux system - Google Patents

Program ABI interface compatibility calculation method based on Linux system Download PDF

Info

Publication number
CN114510267A
CN114510267A CN202210412932.1A CN202210412932A CN114510267A CN 114510267 A CN114510267 A CN 114510267A CN 202210412932 A CN202210412932 A CN 202210412932A CN 114510267 A CN114510267 A CN 114510267A
Authority
CN
China
Prior art keywords
information
data
type
compatibility
abi
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.)
Granted
Application number
CN202210412932.1A
Other languages
Chinese (zh)
Other versions
CN114510267B (en
Inventor
蔡祎男
刘峯
郭建兴
刘吉林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kirin Software Co Ltd
Original Assignee
Kirin Software Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Kirin Software Co Ltd filed Critical Kirin Software Co Ltd
Priority to CN202210412932.1A priority Critical patent/CN114510267B/en
Publication of CN114510267A publication Critical patent/CN114510267A/en
Application granted granted Critical
Publication of CN114510267B publication Critical patent/CN114510267B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of computer science, in particular to a method for calculating program ABI interface compatibility based on a Linux system, which comprises the following steps: s1, analyzing ABI interface information from an ELF format file of a program in the Linux system; s2, dividing the data of the ABI interface information into three categories of data type information, symbol information and ELF file general information according to attribute difference, and designing corresponding data storage structures based on different categories of data characteristics to perform data management; s3, comparing the data types, symbols and ELF file general information of the ABI interface information of different programs based on a data compatibility comparison algorithm, and obtaining a compatibility calculation standard based on comparison calculation, wherein the compatibility calculation standard is used for calculating the ABI interface compatibility of the programs. The method is beneficial to analyzing the overall quality of software updating iteration from the dimension of the program interface, reduces program operation faults or abnormalities caused by ABI interface difference change, and improves the stability of a software system.

Description

Program ABI interface compatibility calculation method based on Linux system
Technical Field
The invention relates to the technical field of computer science, in particular to a method for calculating program ABI interface compatibility based on a Linux system.
Background
With the advent of the information-oriented era and the rapid development of the field of computer science, the development iteration speed of software programs is increasing more and more, so that more service functions and better operation experience are brought to users. The software system has a huge volume, and more software functions and service interfaces are derived. However, as software development progresses, compatibility problems caused by changes of service interfaces between programs in a software system become difficult to predict, and operation failures caused by the problems sometimes occur. Such failures are mostly caused by operation abnormality, functional errors, etc. in the software system during the program operation, and the problem location and repair require manual troubleshooting, thereby causing a great deal of economic loss and manpower consumption. Therefore, a method is needed, which can check the compatibility of the interfaces between the application programs in the software system before the program runs, and is used for evaluating whether the interfaces change and the influence of the changes exist, so that the risk is identified and processed in advance, and the normal and stable running function of the software system is ensured.
Most software systems run on top of a computer operating system. Currently, the mainstream computer operations include Linux, Windows, etc., wherein the Linux operating system has become the mainstream choice for most software server systems with its excellent software ecology. In the Linux system, executable programs and corresponding Link library programs are files in an ELF (executable and Link capable format) format, interfaces of functions, variables and the like in the programs are represented in the ELF files by ABI (application Binary interface) application Binary interfaces, and the ABI interfaces are used for mutual calling among the programs so as to realize the overall cooperative work of the software system. Therefore, for a binary program file, if the external appearance of the existing ABI interface is unchanged in the software iteration development process, the binary program file can be considered to be always downward compatible in the software iteration, that is, the binary program file can be completely used in an interface mode with an existing software system. Conversely, if the ABI interface changes, then an inter-program call based on the changed ABI interface may cause incompatibility problems. Therefore, the compatibility of the ABI interface of the software program is kept, and the method has very important significance for scenes such as software updating, software substitution, software cross-platform migration and the like in the Linux system.
In conclusion, the method capable of accurately analyzing the ABI difference among the software programs in the Linux system plays an important role in software compatibility evaluation work.
Disclosure of Invention
Solves the technical problem
Aiming at the defects in the prior art, the invention provides a method for calculating the compatibility of the ABI interface of the program based on the Linux system, which is beneficial to analyzing the overall quality of software updating iteration from the dimension of the program interface, reducing the program operation fault or abnormity caused by the difference change of the ABI interface and improving the stability of the software system.
Technical scheme
In order to achieve the purpose, the invention is realized by the following technical scheme:
the invention provides a method for calculating program ABI interface compatibility based on a Linux system, which comprises the following steps:
s1, analyzing ABI interface information from an ELF format file of a program in the Linux system;
s2, dividing the data of the ABI interface information into three categories of data type information, symbol information and ELF file general information according to attribute difference, and designing corresponding data storage structures based on different categories of data characteristics to perform data management;
s3, comparing the data types, symbols and ELF file general information of the ABI interface information of different programs based on a data compatibility comparison algorithm, and obtaining a compatibility calculation standard based on comparison calculation, wherein the compatibility calculation standard is used for calculating the ABI interface compatibility of the programs.
Further, step S1 further includes:
before ABI interface information is analyzed, whether debunginfo information is contained in the ELF format file or not is verified, and if the ELF format file is not contained, a corresponding debug file is added to the ELF format file to perform association analysis operation.
Further, step S1 specifically includes: firstly, disassembling the ELF format file through an objdump command to obtain source code information, and simultaneously obtaining first data information by using ctags, eu-readelf and nm commands, wherein the first data information comprises data information of a symbol table, a dependency base and an ABI interface and address offset among functions; then, through traversing the symbol table, second data information is obtained, wherein the second data information comprises the name and the type of a data variable which is in line with the association, and the information of a source file and a header file which belong to the source file; and finally, integrating the first data information and the second data information to generate the ABI interface information.
Further, step S2 specifically includes: the data type information is divided into four subtypes of a general data type, a typedef data type, a structural data type and a function data type according to type differences, and the four subtypes are stored by adopting different list type storage structures respectively.
Further, step S2 further includes: the data storage structure of the symbol information adopts a dictionary representation method of key value pairs, the dictionary representation method represents that symbol names are used as keys, and definitions corresponding to the symbols are used as values to be mapped one by one.
Further, step S2 further includes: the ELF file general information adopts a key-value pair type storage mode, wherein the key-value pair type storage mode refers to that the common information attribute name of each ELF file is used as a key, and the specific information content of each ELF file for the attribute is used as a value.
Further, the method also comprises the step of packaging the data type information, the symbol information and the ELF file general information into a data manager in a centralized mode.
Further, step S3 specifically includes: the data compatibility comparison algorithm comprises a data type comparison algorithm, a symbol type comparison algorithm and an ELF file general information comparison algorithm, and is respectively used for comparing data type information, symbol information and ELF file general information in different ABI interface information.
Further, for the data type comparison algorithm, comparison judgment is carried out according to the sequence of the structure data type, the general data type, the typedef data type and the function data type, and a judgment conclusion of new addition, deletion, modification or consistency of the data types based on the data relevance is obtained.
Further, for the symbol type comparison algorithm, the corresponding symbol definition is inquired according to the name of the primary key symbol, and each data in the symbol definition is divided into a number type, a character string type, a parameter type and a return value type to be compared and judged, so as to obtain a newly added, deleted, modified or consistent judgment conclusion.
Based on the same inventive idea, the invention provides an electronic device comprising a processor and a memory, the memory having stored thereon a computer program which, when executed by the processor, implements the method of any of the above.
Based on the same inventive concept, the present invention provides a readable storage medium having stored therein a computer program which, when executed by a processor, implements the method of any of the above.
Advantageous effects
Compared with the known public technology, the technical scheme provided by the invention has the following beneficial effects: the method realizes the ABI interface compatibility analysis among ELF format program files in the Linux system, identifies the difference of the ABI interfaces for scenes such as software development, software upgrading, software migration and the like, provides a basis for software development and maintenance personnel to evaluate the software compatibility, and can continuously track the change of the ABI interfaces in the software iteration process.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a schematic step diagram of a method for calculating compatibility of ABI interfaces of programs based on a Linux system according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for calculating compatibility of an ABI interface of a program based on a Linux system according to an embodiment of the present invention;
fig. 3 is a structural diagram of structured storage of ABI interface information data in a method for calculating compatibility of program ABI interfaces based on a Linux system according to an embodiment of the present invention;
fig. 4 is a flowchart of a data compatibility comparison algorithm in the method for calculating compatibility of program ABI interfaces based on the Linux system according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1-2, an embodiment of the present invention provides a method for calculating program ABI interface compatibility based on a Linux system, including the steps of:
s1, analyzing ABI interface information from an ELF format file of a program in the Linux system;
s2, dividing the data of the ABI interface information into three categories of data type information, symbol information and ELF file general information according to attribute difference, and designing corresponding data storage structures based on different categories of data characteristics to perform data management;
s3, comparing the data types, symbols and ELF file general information of the ABI interface information of different programs based on a data compatibility comparison algorithm, and obtaining a compatibility calculation standard based on comparison calculation, wherein the compatibility calculation standard is used for calculating the ABI interface compatibility of the programs.
In this embodiment, step S1 further includes: before ABI interface information is analyzed, whether debunginfo information is contained in the ELF format file or not is verified, if not, a corresponding debug file is added to the ELF format file for association analysis operation, and therefore accuracy and integrity of the extracted data information are guaranteed.
In this embodiment, step S1 specifically includes: firstly, disassembling the ELF format file through an objdump command to obtain source code information, and simultaneously obtaining first data information by using ctags, eu-readelf and nm commands, wherein the first data information comprises data information of a symbol table, a dependency base and an ABI interface and address offset among functions; then, through traversing the symbol table, second data information is obtained, wherein the second data information comprises the name and the type of a data variable which is in line with the association, and the information of a source file and a header file which belong to the source file; and finally, integrating the first data information and the second data information to generate the ABI interface information. Specifically, the invention adopts basic commands such as eu-readelf, ctags, obj dump, nm and the like in the Linux system to carry out information acquisition operation on the ELF format file. Firstly, disassembling an ELF format file through an objdump command to obtain source code information, and simultaneously obtaining data information such as a symbol table, a dependency base, an ABI interface, address offset among functions and the like by using ctags, eu-readelf and nm commands, wherein the symbol table is key information in the ABI interface and is a structure information table which is generated in code compiling and contains function names, variable names, segment names, codes and data corresponding relations; then, the names and types of data variables related to the symbols, the source files and header files which belong to the data variables and need attention are acquired by traversing all the symbols in the symbol table to perform operations such as screening, analyzing, processing and calculating offset; and finally, integrating and processing the collected ABI interface information and storing the integrated information.
In this embodiment, as shown in fig. 2, the data type information is stored in a list-type storage structure; the data storage structure of the symbol information adopts a dictionary representation method of key value pairs, the dictionary representation method represents that symbol names are used as keys, and definitions corresponding to the symbols are used as values to be mapped one by one; the ELF file general information adopts a key-value pair type storage mode, wherein the key-value pair type storage mode refers to that the common information attribute name of each ELF file is used as a key, and the specific information content of each ELF file for the attribute is used as a value.
Specifically, the obtained ABI interface information data are divided into three categories of data type information, symbol information, ELF file general information and the like according to attribute differences, and corresponding data storage structures are designed based on different data characteristics for data management. The overall structured storage structure is shown in fig. 2. The data type information describes information such as related variable names, type names, occupied spaces, type indexes and the like in the symbol definition and a comparison result label of the data types, four sub-types such as a general data type, a typedef data type, a structural data type and a function data type are designed according to different types of the data types, and the data types are convenient to traverse and compare compatibility differences by using a list type storage structure. The symbol information includes a symbol table and definitions of each symbol in the table. Therefore, the symbol information data storage structure adopts a key-value pair dictionary representation method, the symbol names in the symbol table are used as keys, the definitions corresponding to the symbols are used as values to carry out one-to-one mapping, and the symbol definition part used as the values can comprise serial information such as the symbol names, parameter variables, return values, header files where the symbols are located, source files where the symbols are located and the like and the symbol data comparison result labels according to the symbol type differences. ELF file common information is a collection of common information attributes that describe all files to be analyzed. Therefore, a typical storage structure of the word is constructed by taking each common information attribute name as a key and taking the specific information content of each file for the attribute as a value in a key-value pair mode. In order to facilitate the unification processing of input data structures for compatibility comparison, the three data structures of the data types, the symbols, the ELF file general information and the like are packaged into the data manager in a centralized mode, namely, each binary program to be analyzed uniquely corresponds to the data manager, and the compatibility comparison of the binary files is converted into the comparison of data members among different data managers.
In this embodiment, in the stage of comparing data compatibility, a consistency decision algorithm for different data managers based on data types, symbols, and ELF file general information is implemented, and compatibility information is obtained through consistency analysis. Fig. 3 and 4 show an overall algorithm design flowchart, in which software update is taken as an example in fig. 3 (compatibility comparison between new software new and old software old), the initialization of the data manager is completed first, and then list comparison of data types is performed. And analyzing the four types of subtypes of the data types according to the comparison judgment sequence of the structural data types, the general data types, the typedef data types and the function data types, so as to reduce the coupling degree of the data type dependency relationship in the comparison process. For example, the input parameter in the function type may be a structure type, a general type, a typedef type, etc., and thus when comparing the data consistency of the function type, the consistency of the input parameter type needs to be compared first.
In this embodiment, the data compatibility comparison algorithm includes a data type comparison algorithm, a symbol type comparison algorithm, and an ELF file general information comparison algorithm, which are respectively used for comparing data type information, symbol information, and ELF file general information in different ABI interface information.
Specifically, in the data type comparison algorithm process, firstly, it is judged whether the total number of members in the structure data type list is equal to the number of the members which have been compared, that is, all the members in the list are compared and enter the subsequent type comparison process such as general data type, otherwise, there are members which are not compared, and the structure type list of the new software needs to be traversed, and each member is matched with the members in the original software structure type list according to the name, if the same name is not matched, the data type only exists in the new software and is a newly added data type, adding 1 to the count corresponding to the compared result, if there is match, further judging whether there is change in the new and old software, that is, information such as type name, occupied space, type index, etc. in the type member is compared, wherein the type index is the data type referred by the data type. There is a problem with type index comparison here, with type B in type A constituent members, type C in type B constituent members, and type A in type C constituent members, i.e., circular dependencies. If the type B refers to other types, the consistency judgment of the type A at this time is finished, and the consistency comparison of the type A is delayed until the next round of circulation. Therefore, when the delay judgment is not triggered in all the association type comparison judgment of the type A, the conclusion that the type A keeps consistent or has difference in new and old software can be directly obtained, the corresponding matching mark is set to be 0 or 1 for storage, the count of the compared result is added to be 1, and when the delay judgment is generated in any association type, the consistency judgment of the type A is ended, and the matching mark is not set. And finally, judging whether the compared result count of the current round is consistent with the compared result count of the previous round or not in the traversing comparison of each round of type, if not, indicating that the non-cyclic dependence type can be compared to obtain a result, and entering the next round of comparison. When the two comparison result counts are consistent, the fact that all types in the round of traversal are in cyclic dependence trigger delay comparison is indicated, the types to be compared are consistent to new software and old software, all the types to be compared are judged to be consistent, corresponding comparison result counts are accumulated, the comparison result counts are equal to the total number of the type members, comparison of all the members of the types in the new software is completed, the types which are not compared in a corresponding original software type list only exist in the original software and are not matched by the new software, and all the types are judged to be deleted data types. And for the four subtypes of the data types, the member consistency judgment of the respective lists is carried out by adopting the algorithm, so that the judgment conclusion of the new addition, deletion, modification or consistency of the data types based on the data relevance is obtained. And after the data type comparison is finished, the symbol type comparison is carried out, the symbol type data is stored in a dictionary form of key value pairs, and the symbol consistency of new software and old software can be matched by inquiring the main key. The unmatched symbols can be added or deleted according to the new software data or the original software data, and the matched symbols compare the specific symbol information. In this case, a number type (int), a string type (str), a parameter type (param), and a return value type (return) are abstracted from the data of the comparison information. The number and character string type can be directly compared with the content of the value to obtain a consistency conclusion, the parameter and return value type is the compared data type, and the comparison result which is completed before can be directly referred, so that the consistency judgment of all the members of the symbol type can be completed through one round of traversal search and comparison. And finally, comparing the general information of the ELF format file, wherein the general information is basically consistent with a symbol comparison algorithm, namely, the comparison result of the members matched with the primary key is modified or consistent, and the general information is the ELF common attribute, so that no scene with unmatched primary keys exists. And for the data type, symbol and the result of the ELF file general information compatibility comparison, generating json text reports respectively, so that the web interface can be analyzed and visualized conveniently.
Based on the same invention concept, the invention further provides an electronic device, which comprises a processor and a memory, wherein the memory is stored with a computer program, and the computer program is executed by the processor to realize the method for calculating the ABI interface compatibility of the program based on the Linux system.
The processor may be, in some embodiments, a Central Processing Unit (CPU), a controller, a microcontroller, a microprocessor (e.g., a GPU), or other data Processing chip. The processor is typically used to control the overall operation of the electronic device. In this embodiment, the processor is configured to execute the program code stored in the memory or process data, for example, execute the program code of the program ABI interface compatibility calculation method based on the Linux system.
The memory includes at least one type of readable storage medium including flash memory, hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), Random Access Memory (RAM), Static Random Access Memory (SRAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), Programmable Read Only Memory (PROM), magnetic memory, magnetic disks, optical disks, etc. In some embodiments, the storage may be an internal storage unit of the electronic device, such as a hard disk or a memory of the electronic device. In other embodiments, the memory may also be an external storage device of the electronic device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the electronic device. Of course, the memory may also include both internal and external memory units of the electronic device. In this embodiment, the memory is generally used for storing an operating method installed in the electronic device and various types of application software, such as a program code of the program ABI interface compatibility calculation method based on the Linux system. In addition, the memory may also be used to temporarily store various types of data that have been output or are to be output.
Based on the same invention idea, the invention further provides a readable storage medium, wherein a computer program is stored in the readable storage medium, and when the computer program is executed by a processor, the method for calculating the compatibility of the ABI interface of the program based on the Linux system is realized.
The method has the advantages of realizing the ABI interface compatibility analysis among ELF format program files in the Linux system, identifying the difference of the ABI interfaces for scenes such as software development, software upgrading, software migration and the like, providing a basis for software development and maintenance personnel to evaluate the software compatibility, and continuously tracking the change of the ABI interfaces in the software iteration process.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not cause the essence of the corresponding technical solutions to depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (12)

1. A method for calculating program ABI interface compatibility based on a Linux system is characterized by comprising the following steps:
s1, analyzing ABI interface information from an ELF format file of a program in the Linux system;
s2, dividing the data of the ABI interface information into three categories of data type information, symbol information and ELF file general information according to attribute difference, and designing corresponding data storage structures based on different categories of data characteristics to perform data management;
and S3, comparing the data types, symbols and ELF file general information of the ABI interface information of different programs based on a data compatibility comparison algorithm, and obtaining a compatibility calculation standard based on comparison calculation, wherein the compatibility calculation standard is used for calculating the ABI interface compatibility of the programs.
2. The method for calculating ABI interface compatibility of programs based on Linux system of claim 1, wherein the step S1 further comprises:
before ABI interface information is analyzed, whether debunginfo information is contained in the ELF format file or not is verified, and if the ELF format file is not contained, a corresponding debug file is added to the ELF format file to perform association analysis operation.
3. The method for calculating program ABI interface compatibility based on Linux system according to claim 1, wherein step S1 specifically comprises: firstly, disassembling the ELF format file through an objdump command to obtain source code information, and simultaneously obtaining first data information by using ctags, eu-readelf and nm commands, wherein the first data information comprises data information of a symbol table, a dependency base and an ABI interface and address offset among functions; then, through traversing the symbol table, second data information is obtained, wherein the second data information comprises the name and the type of a data variable which is in line with the association, and the information of a source file and a header file which belong to the source file; and finally, integrating the first data information and the second data information to generate the ABI interface information.
4. The method for calculating ABI interface compatibility of a program based on a Linux system according to claim 1, wherein the step S2 specifically comprises: the data type information is divided into four subtypes of a general data type, a typedef data type, a structural data type and a function data type according to type differences, and the four subtypes are stored by adopting different list type storage structures respectively.
5. The method for calculating ABI interface compatibility of programs based on Linux system according to claim 1, wherein step S2 further comprises: the data storage structure of the symbol information adopts a dictionary representation method of key value pairs, the dictionary representation method represents that symbol names are used as keys, and definitions corresponding to the symbols are used as values to be mapped one by one.
6. The method for calculating ABI interface compatibility of programs based on Linux system according to claim 1, wherein step S2 further comprises: the ELF file general information adopts a key-value pair type storage mode, wherein the key-value pair type storage mode refers to that the common information attribute name of each ELF file is used as a key, and the specific information content of each ELF file for the attribute is used as a value.
7. The method for calculating ABI interface compatibility of programs based on a Linux system according to claim 6, further comprising collectively packaging said data type information, said symbol information and said ELF file general information as a data manager.
8. The method for calculating program ABI interface compatibility based on Linux system according to claim 1, wherein step S3 specifically comprises: the data compatibility comparison algorithm comprises a data type comparison algorithm, a symbol type comparison algorithm and an ELF file general information comparison algorithm, and is respectively used for comparing data type information, symbol information and ELF file general information in different ABI interface information.
9. The method for calculating program ABI interface compatibility based on Linux system according to claim 8, wherein for the data type comparison algorithm, the comparison decision is performed according to the sequence of the structure data type, the general data type, the typedef data type and the function data type to obtain the decision conclusion of the data type based on the new addition, deletion, modification or consistency of the data relevance.
10. The method of claim 8, wherein for a symbolic type comparison algorithm, the corresponding symbolic definition is queried according to a primary key symbolic name, and each data in the symbolic definition is divided into a numeric type, a string type, a parameter type, and a return value type for comparison and decision, so as to obtain a decision conclusion of addition, deletion, modification, or consistency.
11. An electronic device, comprising a processor and a memory, the memory having stored thereon a computer program which, when executed by the processor, implements the method of any of claims 1-10.
12. A readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 10.
CN202210412932.1A 2022-04-20 2022-04-20 Program ABI interface compatibility calculation method based on Linux system Active CN114510267B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210412932.1A CN114510267B (en) 2022-04-20 2022-04-20 Program ABI interface compatibility calculation method based on Linux system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210412932.1A CN114510267B (en) 2022-04-20 2022-04-20 Program ABI interface compatibility calculation method based on Linux system

Publications (2)

Publication Number Publication Date
CN114510267A true CN114510267A (en) 2022-05-17
CN114510267B CN114510267B (en) 2023-03-21

Family

ID=81555379

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210412932.1A Active CN114510267B (en) 2022-04-20 2022-04-20 Program ABI interface compatibility calculation method based on Linux system

Country Status (1)

Country Link
CN (1) CN114510267B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816772A (en) * 2022-06-29 2022-07-29 统信软件技术有限公司 Debugging method, debugging system and computing device for application running based on compatible layer
CN115659941A (en) * 2022-11-11 2023-01-31 摩尔线程智能科技(北京)有限责任公司 File generation method and device suitable for multi-type interface
CN117251205A (en) * 2023-11-16 2023-12-19 沐曦集成电路(杭州)有限公司 Method, device, equipment and medium for processing header file
CN117407047A (en) * 2023-12-13 2024-01-16 麒麟软件有限公司 Graph database-based linux ecological dependency graph construction method and application

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040054946A1 (en) * 2002-09-18 2004-03-18 Dario Atallah System and method for assessing compatibility risk
US6769115B1 (en) * 2000-05-01 2004-07-27 Emc Corporation Adaptive interface for a software development environment
US20070168957A1 (en) * 2005-11-08 2007-07-19 Red Hat, Inc. Certifying a software application based on identifying interface usage
US20120131563A1 (en) * 2010-11-23 2012-05-24 Kushal Das Mechanism for providing customized visualization of application binary interface/application programming interface-related information
CN104063234A (en) * 2013-03-19 2014-09-24 华为技术有限公司 Compatible method and device
CN104699466A (en) * 2015-03-26 2015-06-10 中国人民解放军国防科学技术大学 Multi-element heuristic instruction selecting method for VLIW system structure
CN104951296A (en) * 2014-03-28 2015-09-30 英特尔公司 Inter-architecture compatability module to allow code module of one architecture to use library module of another architecture
CN109165209A (en) * 2018-08-14 2019-01-08 上海达梦数据库有限公司 The data verification method, device of object type, equipment and medium in database
CN111221777A (en) * 2020-01-02 2020-06-02 中国银行股份有限公司 Data record matching method and device
CN111930385A (en) * 2020-07-28 2020-11-13 苏州亿歌网络科技有限公司 Data acquisition method, device, equipment and storage medium
CN112148283A (en) * 2020-09-14 2020-12-29 第六镜科技(成都)有限公司 Implementation method of cross-platform ABI compatible C + + component framework
CN113688045A (en) * 2021-08-26 2021-11-23 烽火通信科技股份有限公司 Method and device for automatically checking compatibility of binary interface
CN114217773A (en) * 2021-12-13 2022-03-22 中国船舶重工集团公司第七0九研究所 Automatic discrimination method for compatibility of binary interfaces of C/C + + language software package

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6769115B1 (en) * 2000-05-01 2004-07-27 Emc Corporation Adaptive interface for a software development environment
US20040054946A1 (en) * 2002-09-18 2004-03-18 Dario Atallah System and method for assessing compatibility risk
US20070168957A1 (en) * 2005-11-08 2007-07-19 Red Hat, Inc. Certifying a software application based on identifying interface usage
US20120131563A1 (en) * 2010-11-23 2012-05-24 Kushal Das Mechanism for providing customized visualization of application binary interface/application programming interface-related information
CN104063234A (en) * 2013-03-19 2014-09-24 华为技术有限公司 Compatible method and device
CN104951296A (en) * 2014-03-28 2015-09-30 英特尔公司 Inter-architecture compatability module to allow code module of one architecture to use library module of another architecture
CN104699466A (en) * 2015-03-26 2015-06-10 中国人民解放军国防科学技术大学 Multi-element heuristic instruction selecting method for VLIW system structure
CN109165209A (en) * 2018-08-14 2019-01-08 上海达梦数据库有限公司 The data verification method, device of object type, equipment and medium in database
CN111221777A (en) * 2020-01-02 2020-06-02 中国银行股份有限公司 Data record matching method and device
CN111930385A (en) * 2020-07-28 2020-11-13 苏州亿歌网络科技有限公司 Data acquisition method, device, equipment and storage medium
CN112148283A (en) * 2020-09-14 2020-12-29 第六镜科技(成都)有限公司 Implementation method of cross-platform ABI compatible C + + component framework
CN113688045A (en) * 2021-08-26 2021-11-23 烽火通信科技股份有限公司 Method and device for automatically checking compatibility of binary interface
CN114217773A (en) * 2021-12-13 2022-03-22 中国船舶重工集团公司第七0九研究所 Automatic discrimination method for compatibility of binary interfaces of C/C + + language software package

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
A.PONOMARENKO ET AL.: ""Backward Compatibility of Software Interfaces: Steps towards Automatic Verification"", 《PROGRAMMING AND COMPUTER SOFTWARE》 *
CANPOOL: ""abi-compliance-checker理解"", 《CSDN(HTTPS://BLOG.CSDN.NET/CANPOOL/ARTICLE/DETAILS/118380060)》 *
何兴鹏 等: ""Linux程序向Android平台移植的研究"", 《计算机测量与控制》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816772A (en) * 2022-06-29 2022-07-29 统信软件技术有限公司 Debugging method, debugging system and computing device for application running based on compatible layer
CN114816772B (en) * 2022-06-29 2022-09-06 统信软件技术有限公司 Debugging method, debugging system and computing device for application running based on compatible layer
CN115659941A (en) * 2022-11-11 2023-01-31 摩尔线程智能科技(北京)有限责任公司 File generation method and device suitable for multi-type interface
CN117251205A (en) * 2023-11-16 2023-12-19 沐曦集成电路(杭州)有限公司 Method, device, equipment and medium for processing header file
CN117251205B (en) * 2023-11-16 2024-02-06 沐曦集成电路(杭州)有限公司 Method, device, equipment and medium for processing header file
CN117407047A (en) * 2023-12-13 2024-01-16 麒麟软件有限公司 Graph database-based linux ecological dependency graph construction method and application
CN117407047B (en) * 2023-12-13 2024-04-05 麒麟软件有限公司 Graph database-based linux ecological dependency graph construction method and application

Also Published As

Publication number Publication date
CN114510267B (en) 2023-03-21

Similar Documents

Publication Publication Date Title
CN114510267B (en) Program ABI interface compatibility calculation method based on Linux system
US9594553B2 (en) Identifying semantic differences between source code versions
US10621211B2 (en) Language tag management on international data storage
US9400733B2 (en) Pattern matching framework for log analysis
US20100050155A1 (en) Method, computer program product, and hardware product for providing program individuality analysis for source code programs
CN111666206A (en) Method, device, equipment and storage medium for acquiring influence range of change code
CN115129736A (en) Rule engine-based rule event dynamic loading and updating method and related equipment
CN113296786B (en) Data processing method, device, electronic equipment and storage medium
CN111694612A (en) Configuration checking method, device, computer system and storage medium
CN115705250A (en) Monitoring stack usage to optimize programs
US10592400B2 (en) System and method for creating variants in a test database during various test stages
US10678864B2 (en) Analysis model preparing system, programming apparatus, and analysis model preparing method
US11182272B2 (en) Application state monitoring
CN115438026A (en) Database scanning method, device, equipment, storage medium and product
Tukaram Design and development of software tool for code clone search, detection, and analysis
CN114168119A (en) Code file editing method and device, electronic equipment and storage medium
US20210240596A1 (en) Source code file retrieval
CN110321130B (en) Non-repeatable compiling and positioning method based on system call log
US20240248691A1 (en) Detecting software code anomalies based on organizational information
CN106293897B (en) Automatic scheduling system of subassembly
Andrzejak et al. Confguru-A system for fully automated debugging of configuration errors
CN116483735B (en) Method, device, storage medium and equipment for analyzing influence of code change
CN116755684B (en) OAS Schema generation method, device, equipment and medium
US20230418792A1 (en) Method to track and clone data artifacts associated with distributed data processing pipelines
Heidari et al. MetaHive: A Cache-Optimized Metadata Management for Heterogeneous Key-Value Stores

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant