Executable file formats for Linux kernel Research

Source: Internet
Author: User
The executable file format of Linux kernel research-general Linux technology-Linux programming and kernel information. The following is a detailed description. We know that not all binary files in Linux have the same format. Linux uses the binary file processing program to process different binary files separately. The binary processing program identifies a file by embedding a "feature sequence" (a special byte sequence) at the beginning of the file, and sometimes uses some features of the file name, for example, the ELF file starts with 'e' l' F' and the Java file starts with 0xcafebabe.

Linux uses sys_execve to mount executable binary files.

1. The current Linux version (2.2) provides the following binary file handlers:

• A. out: it is mainly used for compatibility with the past, because a. out is difficult to implement dynamic links to be obtained by ELF.

• ELF: Mainstream Linux binary files. Even so, she needs to use a binary handler like other formats.

• EM86: runs Intel Linux binary files on Alpha's host, as if they were Alpha's local binary files.

• Java: the handler returns the interpreted program that executes bytecode by taking the file name of the. class file as a parameter.

• Misc: the most sensible binary processing method. She uses embedded feature numbers or filename suffixes to identify binary formats. In addition, she can configure it at runtime instead of during compilation. In this way, you can add support for new binary format files without re-compiling the kernel. Some say it will replace Java and EM86 binary processors with her.

• Script: mainly supports shell scripts and Perl scripts. To put it bluntly, all the first two characters are #! The executable files are all processed by her.

Before proceeding, we must first understand a Data Structure linux_binfmt;
QUOTE:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.