CN1306400C - Binary system software member and its manufacturing method - Google Patents

Binary system software member and its manufacturing method Download PDF

Info

Publication number
CN1306400C
CN1306400C CNB2004100091079A CN200410009107A CN1306400C CN 1306400 C CN1306400 C CN 1306400C CN B2004100091079 A CNB2004100091079 A CN B2004100091079A CN 200410009107 A CN200410009107 A CN 200410009107A CN 1306400 C CN1306400 C CN 1306400C
Authority
CN
China
Prior art keywords
interface
information
symbol
making
realization
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.)
Expired - Fee Related
Application number
CNB2004100091079A
Other languages
Chinese (zh)
Other versions
CN1581084A (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.)
Peking University
Beijing University of Technology
Original Assignee
Peking University
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 Peking University filed Critical Peking University
Priority to CNB2004100091079A priority Critical patent/CN1306400C/en
Publication of CN1581084A publication Critical patent/CN1581084A/en
Application granted granted Critical
Publication of CN1306400C publication Critical patent/CN1306400C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The present invention provides a binary system software component and a fabricating method thereof. The binary system software component belongs to the fields of computer system software and application software. Syntax information of an interface function/variable is encapsulated in the binary system software component so that component interface information is clear and definite; in addition, presentation and realization of an interface are separated to be convenient for different development organizations to provide different realizations of the same interface, and alternative use is also convenient for the use of the same realization in different application environments to improve the reusability of the software component. The present invention can also detect malicious modification or accidental modification caused by viruses, hackers, etc. for component contents by performing message digest signature processing and proper result publishing channels on the integral component to improve the security of a system assembled.

Description

The method for making of binary software member
Technical field
The invention belongs to computer system software and application software field, be specifically related to a kind of binary software member and preparation method thereof.
Background technology
At present, generally include binary code, data, and the information such as relevant symbol, character string of program in the computer software scale-of-two module, module has multiple public standard format on the scale-of-two form, such as ELF, PE, NE, a.out or the like, incompatible between each standard, can not carry out mutual grammer in advance, call the rules supposition from different suppliers' target program existence in a large number, it is multiplexing to make that the scale-of-two module is not easy to.And in the target program generative process, having two consecutive steps is compiler and link editor, both belong to an instrument chain together, usually link editor thinks that compiler is appropriate phraseological matched rule processing, ignore the processing of relevant information, directly used the symbolic reference address between each software module of way backfill of symbolic name (may be function or global variable) coupling.The problem that this processing mode exists comprises:
1, lacks syntactic information in the symbol of target program, have only symbolic name, bring uncertainty to successive links;
2, module is not protected as information carrier, can't its source of identification; Fail clearly to provide the intermodule dependence.
Summary of the invention
The present invention has overcome above-mentioned existing module form and has lacked information, perhaps information encapsulate irrational defective, a kind of method for making of binary software member is provided, form reusable binary software member.
Another object of the present invention also is, the binding when finishing Module Links more accurately.
Purpose of the present invention is that further the user can verify easily that the software component of whether being held is distorted, and the member issue is safer.
Technology contents of the present invention: a kind of method for making of binary software member, step comprises:
(1) from existing target images, extracts information such as symbolic information, code, data and string table;
(2) according to the symbolic information in the former target images, the symbol that provides in the target images and the symbol that does not provide done clearly divide, provide symbol to provide interface member, the demand interface member who does not provide symbol to put member under, tissue interface information as member;
(3) reorganize encapsulation with interface message with the corresponding realization information of interface, generate target scale-of-two member.
According to the keynote of function/variable that former module provides and needed function/variable, can carry out recompile to the symbolic information of being extracted.
Can adopt the MD5 message digest algorithm that member is increased signing messages.
Interface message can comprise: the title of interface and sign, member's number of interface and each member's description and each member's attribute information.
Realization information can comprise: code segment, data segment, read-only data section, stack segment.And set up and realize information table, comprising: the title, position and the attribute information that provide each realization.
Technique effect of the present invention: the method for making that a kind of binary software member is provided, in this software component, encapsulate in logic coupled relation and realized body (implementation) closely, each realization information is the realization to an interface, and organize clear and definite interface message, being convenient to different development organizations provides the difference of same-interface to realize, simultaneously, also be convenient to same realization information and in different applied environments, use, make the software component reusable.Interface message is issued in same file with realizing information combination, further made software component possess the self-described ability, improved the reusability of software component.
Function/the variable that the present invention's program image is according to target provided and the keynote of needed function (being rreturn value type, function name, parameter type, number of parameters) to the symbol recompile, can recover its syntactic information.
Eap-message digest signature is handled and suitable result announces channel by member integral body is done, and can detect due to illness poison, hacker etc. to the malicious modification or the accidental modification of member content, and then improves the security of system after the assembling, and software component is issued safer.
Component interface information also comprises information about firms, can avoid the shortcoming of disappearance symbol syntactic information in the former target program map.Grammatical levels inspection, coupling when the explicit syntactic information that provides helps the member assembling.
Component interface information further comprises the attribute description of interface, can be convenient to instruct the subsequent group process of assembling, can specify as the interface member function whether the method allows to reentry, whether allow to interrupt, method for synchronous (promptly when function returns, just allowing called side to continue to carry out) or the like whether.
Description of drawings
Fig. 1 is a member form synoptic diagram of the present invention;
Fig. 2 is a component head information format synoptic diagram of the present invention.
Embodiment
Below in conjunction with accompanying drawing, the present invention is made detailed description.
The present invention at first extracts the symbolic information in the former binary software module in order to solve in the target program reflection too simple question of symbolic name, carries out recompile.
Symbolic name can directly extract from former scale-of-two module.During recompile, recover its syntactic information.Provide function (variable) keynote of (required) according to former module, reorganize with the symbol of compression.Here, keynote refers to rreturn value type, title, parameter list of each function (variable) etc.The way of compression is that former data type title is represented with an ascii character.For example: function
int?func_name(unsigned?char?paraml,float?*res)
May be encoded as:
_i9func_nameucPf
Wherein character " i " represents that the type of returning is int, 9 characters " func_name " of character " 9 " expression back are function name, letter " uc " represents that first parameter type is " unsigned char ", second parameter of letter " P " expression is a pointer, and the pointer type of second parameter of letter " f " expression is for pointing to the pointer of float.
By this kind normalization coding, can avoid only providing in the former module " func_name " ambiguity, the binding when being convenient to finish Module Links more accurately as the interface member Name is caused.About the grammatical form problem of interface, can obtain by relevant document (as document, the header file of software).
Binary software structure manufacture method specific practice of the present invention is:
1, extracts useful information in the former target images, comprise information such as code, (read-only) data segment and string table.According to former scale-of-two module format standard, from module, extract code segment, data segment, read-only data section and string table.
2, docking port function, variable divide into groups, and form interface, and name, structure interface table
According to the symbol table in the former target images, symbol that provides in the target images and the symbol that does not provide are done clearly division.Provide symbol to provide interface member, the demand interface member who does not provide symbol to put member under as member.Function, effect by the member are organized into significant interface with two class interface members' content, provide significant interface name.The attribute description of interface also can provide relevant information, whether can specify as the interface member function whether the method allows to reentry, allow to interrupt, whether method for synchronous is (promptly when function returns, just allow called side to continue to carry out) or the like, so that member is used by the third party.If have a plurality of modules will be encapsulated in the member, repeat above step.
3, generate target scale-of-two member.
Structure file destination file header message block is opened the output link file, writes the file header structure, writes each interface message successively, interface table in the structure file.And code segment, data segment, the read-only data section of extracting in second step write output file, and last, string table is write output file.
Further generate signing messages.Credible problem to target program reflection source adopts disclosed MD5 Message Digest 5, eap-message digest is carried out in the software component file word throttling after the conversion generate, and with the fixed position in the software component head of backfill as a result, be convenient to customer inspection.Closing output file.Because the MD5 Message Digest 5 can be done abundant mixing to all bytes in the byte stream, the summary info that is generated is brief, and be readable ASCII character, thereby the user of software component can verify easily that the software component of whether being held is distorted, the member issue is safer.Eap-message digest signature is handled and suitable result announces channel by member integral body is done, and can detect due to illness poison, hacker etc. to the malicious modification or the accidental modification of member content.
With reference to figure 1, in new scale-of-two member form, interface is provided highlightedly and has realized two category informations.Interface message expressed a function that member provided and finish need other member to provide when function is provided service.Realize that message part comprises the specific implementation part of each interface.The member that generates according to this new member form is equivalent to a kind of container, and original software module is encapsulated.Deposit following information in the reusable binary software member successively:
1, member essential information: comprise member title, version, suitable target machine architecture, member size, the skew of interface message description list, the skew of member realization table, the MD5 eap-message digest of whole member.
2, the interface message table of member comprises the title and the sign of interface, member's number of interface and each member's description.Each member all provides respective attributes information.
3, the realization information table of member provides title, position (start offset and length) and the attribute information of each realization.
4, respectively realize the content of information, comprise code segment, data segment, read-only data section, stack segment.Thereafter storage structure is realized the relocation information in the information.The description of last placement member demand interface.
By component head information and interface message table, member has been realized self-described.Wherein, the information packaged type of component head, as shown in Figure 2, its number of being possessed is four bytes, as the sign (for example: 0xFF, ' C ', ' O ', ' M ') of this kind of identification file layout.File size field provides the size (by byte) of whole member.Architecture provides the instruction set encoding of object run platform.The target figure place can be multiple forms such as 16,32,64.Number of ports, the skew of interface message table are used for each interface message that locating file is realized; Realize the body number, realize that information table is used for the position of each realization information of locating file.The character string information table is offset the summary table skew hereof to all kinds of name referring character strings in the outfile.Also can comprise self big or small byte number in the component head message structure, so that subsequent content skew in the calculation document structure is convenient to expand.

Claims (6)

1, a kind of method for making of binary software member, step comprises:
(1) from existing target images, extracts interface message and realization information such as symbolic information, code, data and string table;
(2) according to the symbol table in the former target images, the symbol that provides in the target images and the symbol that does not provide done clearly divide, provide symbol to provide interface member, the demand interface member who does not provide symbol to put member under, tissue interface information as member;
(3) reorganize encapsulation with interface message with the corresponding realization information of interface, generate target scale-of-two member.
2, the method for making of binary software member as claimed in claim 1 is characterized in that: according to the keynote of function/variable that former module provides and needed function/variable, the symbolic information of being extracted is carried out recompile.
3, the method for making of binary software member as claimed in claim 1 is characterized in that: adopt the MD5 message digest algorithm that member is increased signing messages.
4, the method for making of binary software member as claimed in claim 1, it is characterized in that: interface message comprises: the title of interface and sign, member's number of interface and each member's description and each member's attribute information.
5, as the method for making of claim 1 or 4 described binary software members, it is characterized in that: realization information comprises: code segment, data segment, read-only data section, stack segment.
6, the method for making of binary software member as claimed in claim 5 is characterized in that: set up and realize information table, comprising: the title, position and the attribute information that provide each realization.
CNB2004100091079A 2004-05-20 2004-05-20 Binary system software member and its manufacturing method Expired - Fee Related CN1306400C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100091079A CN1306400C (en) 2004-05-20 2004-05-20 Binary system software member and its manufacturing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100091079A CN1306400C (en) 2004-05-20 2004-05-20 Binary system software member and its manufacturing method

Publications (2)

Publication Number Publication Date
CN1581084A CN1581084A (en) 2005-02-16
CN1306400C true CN1306400C (en) 2007-03-21

Family

ID=34581620

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100091079A Expired - Fee Related CN1306400C (en) 2004-05-20 2004-05-20 Binary system software member and its manufacturing method

Country Status (1)

Country Link
CN (1) CN1306400C (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100504903C (en) * 2007-09-18 2009-06-24 北京大学 Malevolence code automatic recognition method
US20110154496A1 (en) * 2009-12-23 2011-06-23 Chun Hsiang Cheng Removable Apparatus and Method for Verifying an Executable File in a Computing Apparatus and Computer-Readable Medium Thereof
CN103777963A (en) * 2014-02-24 2014-05-07 武汉大学 Method for achieving software reuse
CN112052006B (en) * 2020-08-12 2021-06-15 武汉天喻信息产业股份有限公司 Software code compiling method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002101579A1 (en) * 2001-06-07 2002-12-19 International Business Machines Corporation System & method of mapping between software objects & structured language element-based documents
EP1352320A2 (en) * 2001-01-17 2003-10-15 Touchnet Information Systems Inc. Method of accessing data and logic on existing systems through dynamic construction of software components

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1352320A2 (en) * 2001-01-17 2003-10-15 Touchnet Information Systems Inc. Method of accessing data and logic on existing systems through dynamic construction of software components
WO2002101579A1 (en) * 2001-06-07 2002-12-19 International Business Machines Corporation System & method of mapping between software objects & structured language element-based documents

Also Published As

Publication number Publication date
CN1581084A (en) 2005-02-16

Similar Documents

Publication Publication Date Title
US7287217B2 (en) Method and apparatus for processing markup language information
Roy et al. Scenario-based comparison of clone detection techniques
US7539685B2 (en) Index key normalization
CN111177080A (en) Knowledge graph storage and verification method based on block chain and IPFS
CN103294652B (en) A kind of data transfer device and system
US20110099175A1 (en) Pluperfect hashing
CN101520770B (en) Method and device for analyzing, converting and splitting structured data
WO2004002044A2 (en) A system for exchanging binary data
CN107861728A (en) Method from traditional program language to modern procedures language conversion and its system for
CN111859426B (en) Universal encrypted database connector and setting method thereof
Aronson et al. Towards an engineering approach to file carver construction
CN107171897A (en) A kind of interface test method and data-interface test system
CN111367818A (en) System component testing method and device based on dynamic data return
CN106648817A (en) Cross-platform data object transmission method
CN106126564A (en) A kind of method rendered based on dynamic template language
CN101673299B (en) ERP system and data search method and device thereof
CN1306400C (en) Binary system software member and its manufacturing method
Sanchez et al. Bigraphical modelling of architectural patterns
CN113923268A (en) Analysis method, equipment and storage medium for multi-version communication protocol
CN1567829A (en) General purpose data file conversion method
CN101272222A (en) Restriction calibration method and device
CN110427179A (en) MSVL programming automatic generation method and system towards intelligent contract language
WO2011160359A1 (en) Method and device of script-driven software construction
Slind Specifying message formats with Contiguity Types
CN114756837A (en) Block chain-based digital content tracing method and system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20070321

Termination date: 20130520