Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method for adding CRC (cyclic redundancy check) to ELF (executable linkable format) file

A file addition and file technology, applied in the direction of response error generation, redundant code error detection, etc., can solve the problems of unverified verification, reduce generality, improve system complexity, etc., to expand the scope of application, guarantee Integrity, the effect of ensuring correctness

Inactive Publication Date: 2012-09-12
ZHUZHOU CSR TIMES ELECTRIC CO LTD
View PDF2 Cites 17 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0007] The above two methods have disadvantages: method 1, because the file and the CRC checksum are stored separately, the CRC checksum needs to be taken from other places, which makes the verification process troublesome, and it is easy to fail to verify after the checksum is lost Situation; Method 2 will destroy the ELF file structure, because the ELF standard requires that the ELF header be at the beginning of the ELF file. If a verification file header is added in front of the file, it will no longer be an ELF file (become a new file), so this Doing so will destroy the structure of the ELF file, causing the operating system to not directly load this type of file. If you want to load it, you need to write a separate loading program for this new file type, which will increase the complexity of the system, and load the program after changing the operating system platform Need to be rewritten, reducing versatility

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for adding CRC (cyclic redundancy check) to ELF (executable linkable format) file
  • Method for adding CRC (cyclic redundancy check) to ELF (executable linkable format) file
  • Method for adding CRC (cyclic redundancy check) to ELF (executable linkable format) file

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0023] like figure 2 and image 3 As shown, the CRC check of the ELF file in one embodiment of the present invention is used before the ELF file is loaded and after the file is updated. The CRC of the file is checked before loading, and the file can be loaded after the check is passed. In addition, the version of the file can also be checked. information to prevent illegal files from being started; after the file is updated, calculate the CRC of the file to ensure that no errors occur during the update process. The verification process is:

[0024] 1) Open the ELF file that needs to be verified and added the verification file header;

[0025] 2) Point the file pointer to the end of the file, use the ftell function to obtain the length of the file, and judge whether the length of the file is smaller than the length of the verification file header. Since the verification file header is placed at the end of the ELF file, it is obviously the correct file The length is to check ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method for adding CRC (cyclic redundancy check) to an ELF (executable linkable format) file. The method includes: a check file header which contains CRC and version of the ELF file, CRC of the check file header and the like is added to the end of the ELF file, the CRC of the file is calculated when the ELF file is loaded and updated, the CRC obtained by calculating is compared to a CRC value in the check file header for consistence, the file is complete if consistence is positive, and the file is incomplete if consistence is negative. By the method, use of bad and corrupt files is avoided, reliability of an embedded system is improved, loading of correct files and correctness of file updating are effectively guaranteed, and completeness of the files is guaranteed.

Description

technical field [0001] The invention relates to the field of embedded system data communication, in particular to a method for verifying ELF files. Background technique [0002] With the rapid development of embedded technology, embedded products are more and more widely used, such as high-speed railways, communication equipment, etc. Embedded development includes hardware and software development. In order to improve the development speed, files are generally used in embedded software development. The system stores files and data in the file system. The use of the file system can bring many benefits, such as simple and convenient use, rich API interface, fast use and development speed, and convenient file transfer. [0003] However, embedded systems are sometimes used in harsh environments. Complicated surrounding environments, software defects, etc. may cause file content to be destroyed or rewritten, and in special cases, the file system may also be damaged. Usually, whe...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F11/10
Inventor 刘永阳肖家博杨卫峰宁侨
Owner ZHUZHOU CSR TIMES ELECTRIC CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products